<?php 
$nbsp = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
?>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>天涯兼职</title>
<meta name="description" content="天涯北京兼职频道为您免费提供大量最新北京兼职招聘信息,每天发布真实有效的北京兼职招聘工作,找兼职工作请到天涯兼职网。" />
<meta name="keywords" content="北京兼职,北京兼职网,北京兼职招聘信息,北京大学生兼职,北京天涯兼职" />
<link rel="alternate" type="applicationnd.wap.xhtml+xml" media="handheld" href="http://m.doumi.com/bj/"/>
<meta name="mobile-agent" content="format=wml; url=http://m.doumi.com/bj/" />
<meta name="mobile-agent" content="format=xhtml; url=http://m.doumi.com/bj/" />
<meta name="mobile-agent" content="format=html5; url=http://m.doumi.com/bj/" />
<script type="text/javascript" src="//sta.doumi.com/cgi/ganji_sta.php?file=ganji,css/jianzhi/web/c/list.cmb.css&configDir=css/jianzhi/web/c&documentDomain=www.doumi.com"></script>
<link rel="canonical" href="http://www.doumi.com/bj/"/>
<link rel="stylesheet" href="css/bootstrap.min.css">
</head>
<body class="jz-list">
    <div class="header">
    <div class="w clearfix">
        <a class="jz-logo" href="/" title="天涯兼职">天涯兼职</a>
        <a class="location" href="/cityselect/"><?php echo isset($_GET['area_name'])?$_GET['area_name']:'北京';?></a>
        <ul class="nav" data="">
            <li><a href="/">首页</a></li>
            <li><a href="/bj/" class="zhiweiCity" >职位</a></li>

            <li><a href="#" onclick="_hmt.push(['_trackEvent', 'pc_home_shanjiafatie', 'click'])"  target="_blank" rel="nofollow" >企业版</a></li>
            <li><a href="?w=home/user_info" class="user_info" >个人信息管理</a></li>
        </ul>
        <div class="login-info">
                        <a class="login-reg jz_lg" href="javascript:;" rel="nofollow">注册登录</a>
                    </div>
    </div>
</div>
    <div class="crumbs w">
                    <a href="/"  dmaLog="/jianzhi/bj/-/0/0_0_0_0/list/@pn=1@city=bj@atype=click@ca_name=doumi@ca_source=pc@ca_from=mbx_dmjz" >首页</a>
                        &gt;
                                        <a href="/bj/"  dmaLog="/jianzhi/bj/-/0/0_0_0_0/list/@pn=1@city=bj@atype=click@ca_name=doumi@ca_source=pc@ca_from=cs" ><?php echo isset($_GET['area_name'])?$_GET['area_name']:'北京';?>兼职</a>
                        </div>
    
    <div class="filter w mt10">
        <div class="inner-wrap">
            <dl class="clearfix">
                <dt>职位：</dt>
                <dd data-role="hover-area">
                    <div class="big-cate-wrap">
                        <ul class="big-cate clearfix">
                                                                                    <li class="active" data-tagname="top_0">
                                                            <i class="cate-remen-ico"></i><p>热门</p>
                            </li>
                                                                                    <li data-tagname="top_1">
                                                            <i class="cate-rongyi-ico"></i><p>简单易做</p>
                            </li>
                                                                                    <li data-tagname="top_2">
                                                            <i class="cate-paotui-ico"></i><p>跑腿办事</p>
                            </li>
                                                                                    <li data-tagname="top_3">
                                                            <i class="cate-shinei-ico"></i><p>室内推荐</p>
                            </li>
                                                                                    <li data-tagname="top_4">
                                                            <i class="cate-tili-ico"></i><p>体力达人</p>
                            </li>
                                                                                    <li data-tagname="top_5">
                                                            <i class="cate-zhuanye-ico"></i><p>专业技能</p>
                            </li>
                                                                                    <li data-tagname="top_6">
                                                            <i class="cate-yanyi-ico"></i><p>演艺达人</p>
                            </li>
                                                                                    <li data-tagname="top_7">
                                                            <i class="cate-tese-ico"></i><p>特色职位</p>
                            </li>
                                                                                    <li data-tagname="top_8">
                                                            <i class="cate-youxiu-ico"></i><p>优秀青年</p>
                            </li>
                                                                                    <li data-tagname="top_9">
                                                            <i class="cate-qita-ico"></i><p>其他</p>
                            </li>
                                                    </ul>
                    </div>
                    <div class="filter-cate-content">
                                            <!-- <ul class="filter-cate clearfix active">
                                                    <li><a  class="cur1"  href="/bj/" data-target-id="top_0" data-role="second_level_jobtype">全部兼职</a></li>
                                            </ul> -->
                                            <?php foreach($asp as $k=>$v){?>
                                            <ul class="filter-cate clearfix">
                                                    <li><a  href="/bj/" data-target-id="top_<?=$k?>" data-role="second_level_jobtype"><?=$v['classify_name']?></a></li>
                                            </ul>
                                            <?php }?>
                            </div>
                </dd>
            </dl>
            <dl class="clearfix">
                <dt>地区：</dt>
                <dd>
                     <ul class="filter-cate clearfix">
                                                <?php foreach($das as $k=>$v){?>
                                                <li><a id='ac' ds="<?=$v['area_name']?>" href="?w=home/index&area_name=<?=$v['area_name']?>&level=<?=$v['level']?>&id=<?=$v['id']?>&parent_id=<?=$v['parent_id']?>"><?=$v['area_name']?></a></li>
                                                <?php }?>
                    </ul>
                    <ul class="filter-cate clearfix">
                                                <li><a class="cur1" id='aaa' href="?w=home/index">不限</a></li>
                                                <?php foreach($stb as $k=>$v){?>
                                                <li><a id='ac' ds="<?=$v['area_name']?>" href="?w=home/index&area_name=<?=$v['area_name']?>&level=<?=$v['level']?>&id=<?=$v['id']?>&parent_id=<?=$v['parent_id']?>"><?=$v['area_name']?></a></li>
                                                <?php }?>
                    </ul>
                    </dd>
            </dl>
        </div>
    </div>
<script src='./jquery.js'></script>

<!-- //     $(function(){
//         var s = $('#c').val();
//         if(s==''){
//             $('#aaa').attr('class','curl1');
//         }else{
//             $('#aaa').attr('class','');
//             var ac = $('#ac').attr('ds');
//             if(ac==s){
//                 alert(ac)
//             }
            
//         }
//     }) -->

    <div class="filterBar w mt10">
        <div class="chkFilter">
            <div id="payment" class="fake-select fl">
                <div class="fake-select-bar">
                                结算方式
                                <i></i></div>
                <div class="fake-select-wrap">
                    <ul class="fake-select-list">
                                                <li><a href="?w=home/index&pos_sex=<?php echo isset($_GET['pos_sex'])?$_GET['pos_sex']:'';?>&settlement=0&area_name=<?php echo isset($_GET['area_name'])?$_GET['area_name']:'北京';?>&level=<?php echo isset($_GET['level'])?$_GET['level']:1;?>&id=<?php echo isset($_GET['id'])?$_GET['id']:1;?>&parent_id=<?php echo isset($_GET['parent_id'])?$_GET['parent_id']:'';?>">不限</a></li>
                                                <li><a href="?w=home/index&pos_sex=<?php echo isset($_GET['pos_sex'])?$_GET['pos_sex']:'';?>&settlement=1&area_name=<?php echo isset($_GET['area_name'])?$_GET['area_name']:'北京';?>&level=<?php echo isset($_GET['level'])?$_GET['level']:1;?>&id=<?php echo isset($_GET['id'])?$_GET['id']:1;?>&parent_id=<?php echo isset($_GET['parent_id'])?$_GET['parent_id']:'';?>">日结</a></li>
                                                <li><a href="?w=home/index&pos_sex=<?php echo isset($_GET['pos_sex'])?$_GET['pos_sex']:'';?>&settlement=2&area_name=<?php echo isset($_GET['area_name'])?$_GET['area_name']:'北京';?>&level=<?php echo isset($_GET['level'])?$_GET['level']:1;?>&id=<?php echo isset($_GET['id'])?$_GET['id']:1;?>&parent_id=<?php echo isset($_GET['parent_id'])?$_GET['parent_id']:'';?>">周结</a></li>
                                                <li><a href="?w=home/index&pos_sex=<?php echo isset($_GET['pos_sex'])?$_GET['pos_sex']:'';?>&settlement=3&area_name=<?php echo isset($_GET['area_name'])?$_GET['area_name']:'北京';?>&level=<?php echo isset($_GET['level'])?$_GET['level']:1;?>&id=<?php echo isset($_GET['id'])?$_GET['id']:1;?>&parent_id=<?php echo isset($_GET['parent_id'])?$_GET['parent_id']:'';?>">月结</a></li>
                                                <li><a href="?w=home/index&pos_sex=<?php echo isset($_GET['pos_sex'])?$_GET['pos_sex']:'';?>&settlement=4&area_name=<?php echo isset($_GET['area_name'])?$_GET['area_name']:'北京';?>&level=<?php echo isset($_GET['level'])?$_GET['level']:1;?>&id=<?php echo isset($_GET['id'])?$_GET['id']:1;?>&parent_id=<?php echo isset($_GET['parent_id'])?$_GET['parent_id']:'';?>">面议</a></li>
                                            </ul>
                </div>
            </div>
            <div id="sex" class="fake-select fl">
                <div class="fake-select-bar">
                                性别要求
                                <i></i></div>
                <div class="fake-select-wrap">
                    <ul class="fake-select-list">
                                                <li><a href="?w=home/index&pos_sex=0&settlement=<?php echo isset($_GET['settlement'])?$_GET['settlement']:'';?>&area_name=<?php echo isset($_GET['area_name'])?$_GET['area_name']:'北京';?>&level=<?php echo isset($_GET['level'])?$_GET['level']:1;?>&id=<?php echo isset($_GET['id'])?$_GET['id']:1;?>&parent_id=<?php echo isset($_GET['parent_id'])?$_GET['parent_id']:'';?>">全部</a></li>
                                                <li><a href="?w=home/index&pos_sex=2&settlement=<?php echo isset($_GET['settlement'])?$_GET['settlement']:'';?>&area_name=<?php echo isset($_GET['area_name'])?$_GET['area_name']:'北京';?>&level=<?php echo isset($_GET['level'])?$_GET['level']:1;?>&id=<?php echo isset($_GET['id'])?$_GET['id']:1;?>&parent_id=<?php echo isset($_GET['parent_id'])?$_GET['parent_id']:'';?>">男生可做</a></li>
                                                <li><a href="?w=home/index&pos_sex=1&settlement=<?php echo isset($_GET['settlement'])?$_GET['settlement']:'';?>&area_name=<?php echo isset($_GET['area_name'])?$_GET['area_name']:'北京';?>&level=<?php echo isset($_GET['level'])?$_GET['level']:1;?>&id=<?php echo isset($_GET['id'])?$_GET['id']:1;?>&parent_id=<?php echo isset($_GET['parent_id'])?$_GET['parent_id']:'';?>">女生可做</a></li>
                                            </ul>
                </div>
            </div>
            <b>结算方式:</b>  <font color='red'><?php $settlement = isset($_GET['settlement'])?$_GET['settlement']:0; if($settlement==0){echo '不限';}else if($settlement==1){echo '日结';}else if($settlement==2){echo '周结';}else if($settlement==3){echo '月结';}else if($settlement==4){echo '面议';}?></font>
            <b>性別:</b>  <font color='red'><?php $pos_sex = isset($_GET['pos_sex'])?$_GET['pos_sex']:0; if($pos_sex==0){echo '不限';}else if($pos_sex==1){echo '女';}else if($pos_sex==2){echo '男';}?></font>
        </div>
        
    </div> 
    
    <!-- noList box start -->
        <!-- noList box end -->

    <!-- List start -->
<div class="jzList-con w">

<?php foreach($popo as $k=>$v){?>
<div class="jzList-item clearfix">
            <div class="jzList-pic"><img src="http://cdn.doumistatic.com/25,3a2ee4f1fab611_100-100c_8-0.jpeg"></img>
            </div>
            <div class="jzList-txt">
                <div class="jzList-txt-t">
                    <h3>
                        <a target="_blank"  href="/bj/jz_2576256.htm" 
                                                    dmaLog="/jianzhi/bj/-/0/0_0_0_0/list/@pn=1@city=bj@atype=click@ca_name=doumi@ca_from=lby@post_id=2576256@ca_kw=1@ad_type=0"
                                                                        
                        >
                        <?=$v['pos_name']?>
                        </a>
                    </h3>
                        <i class="db-min-ico"></i>
                </div>
                <ul class="jzList-field clearfix">
                    <li><span>兼职类型：</span><?=$classify_name[$k]['classify_name']?></li>
                    <li><span>发布时间：</span><?=date('Y年m月d号',$v['addtime'])?></li>
                    <li><span>性别要求：</span><?php if($v['pos_sex']==0){echo '不限';}else if($v['pos_sex']==1){echo '女';}else if($v['pos_sex']==2){echo '男';}?></li>
                    <li><span>招聘人数：</span><?=$v['pos_num']?>人</li>
                </ul>
            </div>

            <div class="jzList-btn">
                <button class="login-reg reCon jz_lg btn btn-warning btn-danger" position_id='<?=$v["account_id"]?>' job_id='<?=$v["id"]?>'>报名参加</button>
                <span style="display:none"><?=$nbsp?>发布公司:1232 <br> <?=$nbsp?>公司联系人:1232 <br><?=$nbsp?>兼职类型:<?=$classify_name[$k]['classify_name']?> <br> <?=$nbsp?>发布时间: <?=date('Y年m月d号',$v['addtime'])?> <br> <?=$nbsp?>性别要求：<?php if($v['pos_sex']==0){echo '不限';}else if($v['pos_sex']==1){echo '女';}else if($v['pos_sex']==2){echo '男';}$nbsp?>招聘人数：<?=$v['pos_num']?>人<br></span>
                            </div>
            <div class="jzList-salary">
                <span class="money"><em><?=$v['pos_salary']?></em>元/天</span>
                <span><?php if($v['settlement']==1){echo '日结';}else if($v['settlement']==2){echo '周结';}else if($v['settlement']==3){echo '月结';}else if($v['settlement']==4){echo '面议';}?></span>
            </div>
</div>
<?php }?>         
</div>
    <!--  -->
<div class="footer-seo">
    <div class="w">
                    <div class="item item_1">
                <h2>频道介绍</h2>
                <p>
                    北京招聘频道是天涯兼职专为北京求职者精选打造的北京兼职招聘信息网，每日免费为您提供大量最新的北京真实可靠的兼职职位招聘信息，找兼职工作、发布兼职招聘信息就上天涯兼职网。真正真实、高效、靠谱的兼职平台，让您省心、放心、开心。
                    天涯兼职不仅是学生兼职必备神器，也是所有兼职行业人士、企业招聘必不可少的靠谱兼职平台，用户使用量已稳居兼职平台之首。
                </p>
            </div>
        
        
                        <div class="item">
            <h3>北京兼职招聘相关热门城市：</h3>
                        <a href="http://www.doumi.com/sh/" target="_blank">上海兼职</a>
                        <a href="http://www.doumi.com/gz/" target="_blank">广州兼职</a>
                        <a href="http://www.doumi.com/sz/" target="_blank">深圳兼职</a>
                        <a href="http://www.doumi.com/sjz/" target="_blank">石家庄兼职</a>
                        <a href="http://www.doumi.com/zz/" target="_blank">郑州兼职</a>
                        <a href="http://www.doumi.com/jn/" target="_blank">济南兼职</a>
                        <a href="http://www.doumi.com/qd/" target="_blank">青岛兼职</a>
                        <a href="http://www.doumi.com/hf/" target="_blank">合肥兼职</a>
                        <a href="http://www.doumi.com/ty/" target="_blank">太原兼职</a>
                        <a href="http://www.doumi.com/xa/" target="_blank">西安兼职</a>
                        <a href="http://www.doumi.com/wh/" target="_blank">武汉兼职</a>
                        <a href="http://www.doumi.com/cs/" target="_blank">长沙兼职</a>
                        <a href="http://www.doumi.com/cc/" target="_blank">长春兼职</a>
                        <a href="http://www.doumi.com/fz/" target="_blank">福州兼职</a>
                        <a href="http://www.doumi.com/km/" target="_blank">昆明兼职</a>
                        <a href="http://www.doumi.com/tj/" target="_blank">天津兼职</a>
                        <a href="http://www.doumi.com/cq/" target="_blank">重庆兼职</a>
                        <a href="http://www.doumi.com/hz/" target="_blank">杭州兼职</a>
                        <a href="http://www.doumi.com/gy/" target="_blank">贵阳兼职</a>
                        <a href="http://www.doumi.com/cd/" target="_blank">成都兼职</a>
                        <a href="http://www.doumi.com/sy/" target="_blank">沈阳兼职</a>
                        <a href="http://www.doumi.com/dl/" target="_blank">大连兼职</a>
                        <a href="http://www.doumi.com/nj/" target="_blank">南京兼职</a>
                        <a href="http://www.doumi.com/su/" target="_blank">苏州兼职</a>
                        <a href="http://www.doumi.com/nc/" target="_blank">南昌兼职</a>
                        <a href="http://www.doumi.com/xm/" target="_blank">厦门兼职</a>
                    </div>
                <div class="item">
            <h3>北京兼职招聘职位推荐：</h3>
                        <a href="http://www.doumi.com/bj/chuandan/" target="_blank">北京传单派发兼职招聘</a>
                        <a href="http://www.doumi.com/bj/daogou/" target="_blank">北京促销导购兼职招聘</a>
                        <a href="http://www.doumi.com/bj/mote/" target="_blank">北京礼仪模特兼职招聘</a>
                        <a href="http://www.doumi.com/bj/fuwuyuan/" target="_blank">北京服务员兼职招聘</a>
                        <a href="http://www.doumi.com/bj/wenjuandiaocha/" target="_blank">北京问卷调查兼职招聘</a>
                        <a href="http://www.doumi.com/bj/chongchang/" target="_blank">北京充场兼职招聘</a>
                        <a href="http://www.doumi.com/bj/shixisheng/" target="_blank">北京实习生兼职招聘</a>
                        <a href="http://www.doumi.com/bj/songcanyuan/" target="_blank">北京送餐员兼职招聘</a>
                        <a href="http://www.doumi.com/bj/fanyi/" target="_blank">北京翻译兼职招聘</a>
                        <a href="http://www.doumi.com/bj/xydl/" target="_blank">北京校园代理兼职招聘</a>
                    </div>
                
                        <div class="item">
            <h3>友情链接：</h3>
             
            <a href="http://m.doumi.com/bj/ " target="_blank">天涯兼职北京移动页</a>
             
            <a href="http://www.doumi.com/gongsi/bj/" target="_blank">北京公司招聘</a>
             
            <a href="http://www.doumi.com/bj/v/waikuai/" target="_blank">北京外快兼职</a>
             
            <a href="http://www.doumi.com/bj/v/zhengqian/" target="_blank">北京干什么能挣钱</a>
             
            <a href="http://www.doumi.com/bj/v/zhuanqian/" target="_blank">北京做什么赚钱快</a>
             
            <a href="http://www.doumi.com/v/zhuanqian/" target="_blank">做什么赚钱快</a>
             
            <a href="http://www.doumi.com/bj/v/zhongdiangong/" target="_blank">北京找钟点工</a>
             
            <a href="http://www.doumi.com/bj/v/wangluojianzhi/" target="_blank">北京网络兼职</a>
             
            <a href="http://www.doumi.com/bj/v/xiaoshigong/" target="_blank">北京小时工</a>
             
            <a href="http://www.doumi.com/bj/v/shujiajianzhi/" target="_blank">北京暑假兼职</a>
             
            <a href="http://www.doumi.com/bj/v/shougonghuo/" target="_blank">北京手工活兼职</a>
             
            <a href="http://www.doumi.com/bj/v/daxuesheng/" target="_blank">北京大学生兼职</a>
             
            <a href="http://www.doumi.com/bj/v/zaijiajianzhi/" target="_blank">北京在家兼职</a>
             
            <a href="https://bj.daojia.com" target="_blank">北京58到家</a>
             
            <a href="http://bj.caihao.com/" target="_blank">北京招聘网</a>
             
            <a href="http://www.kanzhun.com/xsa7p1.html" target="_blank">北京工资水平</a>
             
            <a href="http://www.xin.com/beijing/" target="_blank">北京二手车</a>
             
            <a href="http://www.doumihz.com/" target="_blank">天涯慧展</a>
             
            <a href="http://beijing.haozu.com/" target="_blank">北京写字楼出租</a>
             
            <a href="http://www.liepin.com/bj/zhaogongzuo/" target="_blank">北京找工作</a>
             
            <a href="http://beijing.17house.com/" target="_blank">北京装修网</a>
             
            <a href="http://www.58.com/wenan/" target="_blank">广告文案招聘</a>
             
            <a href="http://www.58.com/jianzhi/" target="_blank">兼职网</a>
             
            <a href="http://www.mayi.com/beijing/" target="_blank">北京短租房</a>
             
            <a href="http://www.haozu.com/bj/" target="_blank">北京写字楼出租</a>
             
            <a href="http://www.chinahr.com/beijing/jobs/" target="_blank">北京人才网最新招聘信息</a>
             
            <a href="http://beijing.huangye88.com/jiaoyu/" target="_blank">北京教育网</a>
             
            <a href="http://bj.ganji.com/mingqizhaopin/" target="_blank">北京名企招聘</a>
             
            <a href="http://bj.ganji.com/jianzhi/" target="_blank">北京兼职网</a>
             
            <a href="http://bj.ganji.com/zhaopin/" target="_blank">北京招聘网</a>
                    </div>
                <!-- DMC-775-->
                 
        <!-- 推广 -->
        <!--
        <div class="item">
            <h3>推广：</h3>
            <a href="http://www.doumi.com/jump.htm?url=https%3a%2f%2fcreditcard.cmbc.com.cn%2fonline%2fcard.aspx%3ftradeFrom%3dYX-QDTX13%26EnStr%3dB5DA8C4CA3824B42DA6E759BE44DBFEE%26jg%3d624000001%26jgEnStr%3d3164CD4163E95CFF5F778A47029F1CAF&to=dm_pc_lbpost_dbwzl_msyhxyk" rel="nofollow" target="_blank">任选一卡赢豪礼</a>
        </div>-->
            </div>
</div>
<!--  -->
<div class="footer">
        <div class="content">
        <div class="w">
            <a class="logo" href="/" title="天涯兼职">天涯兼职</a>
            <div class="qr-code">
                <span class="title">扫描关注公众号</span>
                <img src="//sta.doumistatic.com/src/image/jianzhi/web/c/v2/qrcode_2.png" alt="">
            </div>
            <div class="hotline">
                <span class="title">客服热线</span>
                <span class="phone">010-57977077</span>
                <span class="title">合作邮箱</span>
                <span class="email">ecom#doumi.com</span>
            </div>
            <ul class="nav">
                <li>
                    关于我们
                    <ul class="sub-nav">
                        <li><a href="/aboutus/" rel="nofollow">公司简介</a></li>
                        <li><a href="/progress/" rel="nofollow">天涯历程</a></li>
                        <li><a href="/joinus/" rel="nofollow">加入天涯</a></li>
                        <li><a href="/contactus/" rel="nofollow">联系天涯</a></li>
                    </ul>
                </li>
                <li><a href="/chuangpeisheng/" rel="nofollow">天涯创培生</a></li>
                <!--
                <li><a href="#">联系我们</a></li>
                <li><a href="#">帮助中心</a></li>
                <li><a href="#">意见与反馈</a></li> -->
                <li><a target="_blank" href="http://news.doumi.com/">天涯资讯</a></li>
                <li><a href="/payservice/" rel="nofollow">有偿服务</a></li>
                <li><a href="/help/jzgz/" rel="nofollow">帮助中心</a></li>
            </ul>
        </div>
    </div>
    <p class="copyright">&copy;2015-2017 天涯&trade; 北京世诚优聘科技发展有限公司 <a target="_blank" href="http://www.miibeian.gov.cn" rel="nofollow">京ICP备15058772号</a> <a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=11010802022669" rel="nofollow">京公网安备11010802022669号</a> 联系电话：010-57317000</p>
</div>
    <div style="display:none;" id="content_3">
    <!--以下所有显示操作：添加hide类表示隐藏该元素，去除hide类表示显示该元素-->
    <div class="login-pop c-pop w250" id="win_login">
        <!--密码登录与手机号登录按钮切换，切换至哪个按钮给此按钮添加active类-->
        <div class="login-header clearfix">
            <span class="fl" data-switch="0">密码登录</span>
            <span class="fl active" data-switch="1">手机号登录</span>
        </div>
        <!--start 密码登录-->
        <form action="#" class="login-pwd">
            <!--密码出错出现提示，去掉hide类即可显示-->
            <!-- <div class="error-area" id="login_error" style="display:none;"> -->
            <div class="error-area" id="login_error_pwd" style="display:none;">
                <!-- <span class="lg_error_msg"> -->
                <span class="lg_error_msg" id="lg_error_msg_pwd">
                    <i class="error-area-ico"></i>
                    使用密码登录
                </span>
            </div>
            <div class="reg-input">
                <i class="tel-ico"></i>
                <input type="text" name="lg_phone" id="lg_phone" maxlength="11" placeholder="请输入手机号">
            </div>
            <!-- <div class="reg-input mt20"> -->
            <div class="pwd-input">
                <i class="pwd-ico"></i>
                <input type="password" name="lg_pass" id="lg_password" placeholder="请输入登录密码">
            </div>

            <div class="reg-text">
                <label class="auto-login">
                    <!-- <input type="checkbox"> 下次自动登陆 -->
                </label>
                <a href="javascript:" class="fr" id="btn_forget">老用户设置密码/忘记密码</a>
            </div>
            <!--start 获取图片验证码-->
            <div class="code-input hide">
                <input type="text" class="send-codeInput" maxlength="4" placeholder="输入图片验证码" name="lg_verify" id="lg_verify">
                <span class="send-img fr">
                    <img src="" name="lg_verify_img"/>
                </span>
            </div>
            <div class="reg-text pass-change-verifyCode hide">
                <a href="javascript:;" class="fr" id="lg_change_verify">看不清，换一个</a>
            </div>
            <!--end-->
            <!--登录按钮-->
            <div class="login-btn">
                <input type="submit" value="登录" class="btn btn-large" id="doLoginPassword">
            </div>
            <!--没有账号注册-->
            <div class="reg-text reg-go">
                还没有账号？<a href="javascript:" id="btn_register">去注册</a>
            </div>
        </form>
        <!--end-->
        <!--start 手机号登录-->
        <form action="#" class="login-phone hide">
            <!--密码出错出现提示，去掉hide类即可显示-->
            <!-- <div class="error-area" id="login_error" style="display:none;"> -->
            <div class="error-area" id="login_error_phone" style="display:none;">
                <span class="lg_error_msg" id="lg_error_msg_phone">
                    <i class="error-area-ico"></i>
                    使用手机号码直接登录
                </span>
            </div>
            <div class="reg-input">
                <i class="tel-ico"></i>
                <input type="text" name="lg_phone2" id="lg_phone2" maxlength="11" placeholder="请输入手机号">
            </div>
            <div class="code-input">
                <input type="text" class="send-codeInput" placeholder="动态密码" name="lg_code" id="lg_code">
                <span class="fr get-dynamic-pass hide" data-btn="get_code_n"></span>
                <a href="javascript:" class="fr get-dynamic-pass" id="lg_get_code" data-btn="get_code_y">
                    获取动态密码
                </a>
            </div>
            <!--start 获取图片验证码-->
            <div class="code-input">
                <input type="text" class="send-codeInput" maxlength="4" placeholder="输入图片验证码" name="lg_verify2" id="lg_verify2">
                <span class="send-img fr">
                    <img src="" name="lg_verify_img2"/>
                </span>
            </div>
            <div class="reg-text pass-change-verifyCode hide">
                <a href="javascript:;" class="fr lg_change_verify2" id="lg_change_verify2">看不清，换一个</a>
            </div>
            <!--end-->
            <div class="login-btn">
                <input type="submit" value="登录" class="btn btn-large" id="doLogin">
            </div>
        </form>
        <!--end-->
    </div>
    <!--end-->
    <!--start 注册-->
    <div class="login-pop c-pop w250 hide" id="win_register">
        <form>
            <div class="error-area" id="login_error" style="display:none;">
                <span class="lg_error_msg">
                    <i class="error-area-ico"></i>
                    使用手机号注册
                </span>
            </div>
            <div class="reg-input">
                <i class="tel-ico"></i>
                <input type="text" name="re_phone" id="re_phone" maxlength="11" placeholder="请输入手机号">
            </div>
            <div class="pwd-input">
                <i class="pwd-ico"></i>
                <input type="password" name="re_pass" id="re_password" placeholder="请输入密码">
            </div>
            <div class="code-input">
                <input type="text" class="send-codeInput" placeholder="动态密码" name="re_code" id="re_code">
                <span class="fr get-dynamic-pass hide" data-btn="get_code_n"></span>
                 <a href="javascript:" class="fr get-dynamic-pass" id="re_get_code" data-btn="get_code_y">获取动态密码</a>
            </div>

            <!--start 获取图片验证码, 分别给外层div增加hide类可隐藏 -->
            <div class="code-input">
                <input type="text" class="send-codeInput" maxlength="4" placeholder="输入图片验证码" name="re_verify" id="re_verify">
                <!-- <span class="fr"> -->
                <span class="send-img fr">
                    <img src="" name="re_verify_img"/>
                </span>
            </div>
            <div class="reg-text pass-change-verifyCode hide">
                <a href="javascript:;" class="fr re_change_verify" id="re_change_verify">看不清，换一个</a>
            </div>
            <!--end-->
            <div class="login-btn">
                <input type="submit" value="注册" class="btn btn-large" id="doRegister">
            </div>
            <!--注册协议-->
            <div class="reg-text reg-go fc-gray">
                注册表示同意<a href="/agreement/" target="_blank">《天涯兼职协议》</a>
            </div>
            <!--已账号去登录-->
            <div class="reg-text reg-go">
                已有天涯帐号？<a href="javascript:" id="btn_login">去登录</a>
            </div>
        </form>
    </div>
    <!--end-->
    <!--start 忘记密码-->
    <div class="login-pop c-pop w250 hide" id="win_forget">
        <!-- <form> -->
        <form class="forgot-pwd">
            <div class="error-area" id="login_error" style="display:none;">
                    <span class="lg_error_msg">
                        <i class="error-area-ico"></i>
                        使用手机号找回密码
                    </span>
                </div>
            <div class="reg-input">
                <i class="tel-ico"></i>
                <input type="text" name="fg_phone" id="fg_phone" maxlength="11" placeholder="请输入手机号">
            </div>
            <div class="pwd-input">
                <i class="pwd-ico"></i>
                <input type="password" name="fg_pass" id="fg_password" placeholder="请输入新密码">
            </div>
            <div class="code-input">
                <input type="text" class="send-codeInput" placeholder="动态密码" name="fg_code" id="fg_code">
                <span class="fr get-dynamic-pass hide" data-btn="get_code_n"></span>
                <a href="javascript:" class="fr get-dynamic-pass" id="fg_get_code" data-btn="get_code_y">   
                获取动态密码</a>
            </div>
            <!--start 获取图片验证码, 分别给外层div增加hide类可隐藏 -->
            <div class="code-input hide">
                <input type="text" class="send-codeInput" maxlength="4" placeholder="输入图片验证码" name="fg_verify" id="fg_verify">
                <span class="send-img fr">
                    <img src="" name="fg_verify_img"/>
                </span>
            </div>
            <div class="reg-text pass-change-verifyCode hide">
                <a href="javascript:;" class="fr fg_change_verify" id="fg_change_verify">看不清，换一个</a>
            </div>
            <!--end-->
            <div class="login-btn">
                <input type="submit" value="重置密码" class="btn btn-large" id="doForget">
            </div>
        </form>
    </div>
    <!--end-->
    <!--登录成功-->
    <div class="c-pop w250 win_success hide" id="win_success">
        <div class="c-pop-txt success success_tag">成功</div>
        <div class="c-pop-btn">
            <button class="btn" id="btn_success" type="button">确认</button>
        </div>
    </div>
    <!-- download app start -->
    <div class="c-pop win_download w250 hide" id="win_download">
        <div class="c-pop-img"><img src="//sta.doumistatic.com/src/image/qrcode_doumi_app.png" alt="" id="win_download_img"></div>
        <div class="c-pop-txt fc-gray">
            <p>下载天涯兼职APP，</p>
            <p>点击菜单“我的”-“我的简历”中查看</p>
        </div>
        <div class="c-pop-btn">
            <button class="btn btn_download" type="button">我知道了</button>
        </div>
    </div>
    <!-- download app end -->
</div>
<!--footer !-->
<script type="text/javascript">
var panel = '';
var step = 60;
var downLoad ='';
GJ.use('js/util/modal/modal.js, js/util/modal/modal.css, js/util/ui_compatible/placeholder.js', function(Modal){
    $("#h_phone-qrcode").mouseover(function(){
        $("#h_qrcode").show();
        return true;
    }).mouseout(function(){
        $("#h_qrcode").hide();
        return true;
    });

    // do login
    panel = new Modal({
        $triggerEl:$('.jz_lg'),
        title   : '兼职信息',
        content : $('#content_3'),
        mask : 'true',
        width:440,
        height: 420
    });

    //do download
    downLoad = new Modal({
        $triggerEl:$('.menu-info'),
        title   : '下载APP',
        content : $('#content_3'),
        mask : 'true',
        width:410,
        height: 300
    });


    $('.js-modal-title').css('text-align', 'center');

    $('.menu-info').live('click', function() {
        $('.js-modal-title').text('下载APP');
        $('.login-pop').hide();
        $('.win_download').show();
        $('.js-modal').addClass('modal-app');  

        $('.btn_download').live('click', function(){
            $('.js-modal').removeClass('modal-app');
            $('.js-modal').removeClass('js-show');  
            $('.js-modal-mask').removeClass('js-show');  
            $('.win_download').hide();
        });

        $('.js-modal-close').live('click', function(){
            $('.js-modal').removeClass('modal-app');
            $('.win_download').css('display', 'none');
        });
    });

    $(document).on('click',".confirm",function(){
        var position_id = $(this).attr('position_id');
        $.ajax({
            url:"?w=home/confirm",
            data:{
                'position_id' :position_id
            },
            dataType:"json",
            success:function(data){
                if (data.error) {
                    $('.confirm').attr('disabled','disabled')
                    $('.confirm').html('已报名')
                    
                    for (var i = 1; i <= $('.reCon').length; i++) {

                        if ($('.jz_lg').eq(i).attr('job_id') == position_id) {
                            $('.jz_lg').eq(i).html('已报名')

                            $('.jz_lg').eq(i).attr('disabled','disabled')
                        };
                    };
                    alert(data.msg+',请等待商家与您联系!')

                }else{
                    alert(data.msg)
                }
            }
        })
    })
    $(document).on('click','.jz_lg', function() {
        var id = $(this).attr('position_id')
        var job_id = $(this).attr('job_id')
        var content = $(this).next().html()
        $('.confirm').html('确认报名')
        $('.confirm').removeAttr('disabled')
        $.ajax({
            type:"get",
            url:"index.php?w=home/findone",
            data:{
                'account_id':id
            },
            dataType:"json",
            success:function(data){
                if(data.error){
                    var nbsp = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'
                    var contents = '';
                    contents += nbsp+'企业名称:' + data.msg.company+'<br />'
                    contents += nbsp+'企业联系人:' + data.msg.company+'<br />'
                    contents += content + '<br />';
                    contents += "<center><button class='btn btn-warning confirm btn-danger' position_id='"+job_id+"' >确认报名</button></center>";
                    $('.js-modal-content').html(contents)
                }else{
                    alert(data.msg)
                }
            }
        })
        $('.js-modal-title').text('职位信息');
        $('.login-pop').hide();
        $('.c-pop').hide();
        $('.login-pop:eq(3)').show();
        $('.login-pop:eq(3)').find('.login-header').find('span').removeClass('active');
        $('.login-pop:eq(3)').find('.login-header').find('span:eq(0)').addClass('active');
        if('placeholder' in document.createElement('input')){
            $('input:text').val('');
            $('input:password').val('');
        }
        clearTimeout(ctime);
        step = 60;
        $('.login-pop:eq(3)').find('form').hide();
        $('.login-pop:eq(3)').find('form:eq(0)').show();
        $('[data-btn="get_code_n"]').hide();
        $('[data-btn="get_code_y"]').show();
        //$('.login-pop:eq(3)').find('form:eq(0)').find('.lg_error_msg').text('使用密码登录');
        //$('.login-pop:eq(3)').find('form:eq(1)').find('.lg_error_msg').text('使用手机号码直接登录');
        //$('.login-pop:eq(4)').find('.lg_error_msg').text('使用手机号注册');
        //$('.login-pop:eq(5)').find('.lg_error_msg').text('使用手机号找回密码');
        $('input[name="lg_verify"]').parent().hide();
        $('input[name="lg_verify2"]').parent().hide();
        $('input[name="re_verify"]').parent().hide();
        $('input[name="fg_verify"]').parent().hide();
        $('.pass-change-verifyCode').hide();
        $('.login-pop:eq(3)').find('form:eq(0)').find('.error-area').hide();
        $('.login-pop:eq(3)').find('form:eq(1)').find('.error-area').hide();
        $('.login-pop:eq(4)').find('form:eq(0)').find('.error-area').hide();
        $('.login-pop:eq(5)').find('form:eq(0)').find('.error-area').hide();
        $('.js-modal').addClass('modal-account');
    });

    $('.jz_lgout').click(function(){
        // do cancel baoming
        $.ajax({
            'type' : 'POST',
            'url'  : '/api/v1/client/logout',
            'dataType' : 'json',
            'success' : function (json) {
                window.location.reload();
            },
            'error' : function (err) {
                var err = $.parseJSON(err.responseText);
                window.alert(err.message);
                window.location.reload();
            }
        });

    });

    $('.login-header > span').live('click', function() {
        var container = $(this).parents('.login-pop');
        var flg = $(this).attr('data-switch');
        $(this).parent().find('span').removeClass('active');
        $(this).addClass('active');
        container.find('form').hide();
        container.find('form:eq('+flg+')').show();
        if (flg == 1) {
            $('.modal-account').removeClass('account-password account-register account-modify').addClass('account-phone');
        } else {
            $('.modal-account').removeClass('account-phone account-register account-modify').addClass('account-password');
        } 
    });

    $('#lg_get_code').live('click', function (){
        var container = $(this).parent().parent().parent();
        var phone = container.find('input[name="lg_phone2"]').val();
        var phonereg  = /^1[34578]\d{9}$/;
        // var iserror = (container.find(".lg_error_msg").html().replace('<i class="error-area-ico"></i>','').length != container.find(".lg_error_msg").html().length)?true:false;
        var iserror = (container.find("#lg_error_msg_phone").html().replace('<i class="error-area-ico"></i>','').length != container.find("#lg_error_msg_phone").html().length)?true:false;
        
        if (!phonereg.test(phone)) {
            // container.find('.error-area').show();
            container.find('#login_error_phone').show();
            // container.find(".lg_error_msg").html('<i class="error-area-ico"></i>请输入正确的手机号');
            container.find("#lg_error_msg_phone").html('<i class="error-area-ico"></i>请输入正确的手机号');
            return false;
        } else {
            // container.find('.error-area').hide();
            container.find('#login_error_phone').hide();
            // container.find(".lg_error_msg").html('<i class="error-area-ico"></i>使用手机号码直接登录');
            container.find("#lg_error_msg_phone").html('<i class="error-area-ico"></i>使用手机号码直接登录');
        }
        $.ajax({
            'type' : 'POST',
            'url'  : '/api/v1/client/authCkCode/',
            'data' : {mobile:phone},
            'dataType' : 'json',
            'success' : function (json) {
                if (json.code == 0) {
                    step = 60;
                    countDown(container);
                    // container.find(".lg_error_msg").html('<i class="error-area-ico"></i>请输入验证码');
                    container.find("#lg_error_msg_phone").html('<i class="error-area-ico"></i>请输入验证码');
                    container.find('input[name="lg_verify2"]').parent().hide();
                    container.find('.pass-change-verifyCode').hide();
                } else {
                    // container.find('.error-area').show();
                    container.find('#login_error_phone').show();
                    // container.find(".lg_error_msg").html('<i class="error-area-ico"></i>'+json.message);
                    container.find("#lg_error_msg_phone").html('<i class="error-area-ico"></i>'+json.message);
                }
            },
            'error' : function (err) {
                var err = $.parseJSON(err.responseText);
                if (err.message && (err.code != -3 && err.code != -4)) {
                    // container.find('.error-area').show();
                    container.find('#login_error_phone').show();
                    // container.find(".lg_error_msg").html('<i class="error-area-ico"></i>'+err.message);
                    container.find("#lg_error_msg_phone").html('<i class="error-area-ico"></i>'+err.message);
                }

                if (err.code == -3 || err.code == -4) {
                    // container.find('.error-area').show();
                    container.find('#login_error_phone').show();
                    // container.find(".lg_error_msg").html('<i class="error-area-ico"></i>请输入验证码');
                    container.find("#lg_error_msg_phone").html('<i class="error-area-ico"></i>请输入验证码');
                    var ishidden = container.find('img[name="lg_verify_img2"]').parent().parent().is(":hidden");
                    container.find('input[name="lg_verify2"]').parent().show();
                    if (container.find('img[name="lg_verify_img2"]').attr('src') == "" || ishidden || iserror) {
                        container.find('input[name="lg_verify2"]').val('');
                        container.find('img[name="lg_verify_img2"]').attr('src', '/api/v1/client/showCkCodeV2?rand=' + Math.random());
                    }
                    // container.find('.pass-change-verifyCode').show();
                    container.find('a[id="lg_change_verify2"]').parent().show();
                    container.find('a[id="lg_change_verify2"]').attr('is_click', '1');
                } else {
                    //window.location.reload();
                }
            }
        });
        return false;
        
    });

    $('#lg_verify').live('keyup', function() {
        var container = $(this).parents('.login-pop');
        var phone  = container.find('input[name="lg_phone"]').val();
        var verify = $(this).val();
        var phonereg  = /^1[34578]\d{9}$/;
        var verifyreg = /^\w{4}$/i;
        
        if(verify.length >= 4) {
            var lg_error_msg_pwd = container.find("#lg_error_msg_pwd").text();
            if (lg_error_msg_pwd == '请输入验证码' || lg_error_msg_pwd == '图片验证码错误！') {
                container.find('#login_error_pwd').hide();
                container.find("#lg_error_msg_pwd").html('');
            }
        }

        if (!phonereg.test(phone)) {
            return false;
        }

        if (verify.length < 4) {
            return false;
        }

        if (verify.length >= 4 && !verifyreg.test(verify)) { 
            // container.find('.error-area').show();
            // container.find('form:eq(0)').find(".lg_error_msg").html('<i class="error-area-ico"></i>'+'图片验证码错误！');
            container.find('#login_error_pwd').show();
            container.find("#lg_error_msg_pwd").html('<i class="error-area-ico"></i>'+'图片验证码错误！');
            return false;
        }
    });

    $('#lg_verify2').live('keyup', function() {
        var container = $(this).parents('.login-pop');
        var phone  = container.find('input[name="lg_phone2"]').val();
        var verify = $(this).val();
        var phonereg  = /^1[34578]\d{9}$/;
        var verifyreg = /^\w{4}$/i;
        if (!phonereg.test(phone)) {
            return false;
        }
        if (verify.length < 4 || verify.length > 4) {
            return false;
        }
        if (verify.length = 4 && !verifyreg.test(verify)) {
            //container.find('input[name="lg_verify2"]').val('');
            //container.find('input[name="lg_verify2"]').blur();
            // container.find('.error-area').show();
            container.find('#login_error_phone').show();
            container.find('form:eq(1)').find(".lg_error_msg").html('<i class="error-area-ico"></i>'+'图片验证码错误！');
            return false;
        }
        $.ajax({
            'type' : 'POST',
            'url'  : '/api/v1/client/authCkCode/',
            'data' : {mobile:phone, code:verify},
            'dataType' : 'json',
            'success' : function (json) {
                if (json.code == 0) {
                    container.find('input[name="lg_verify2"]').parent().hide();
                    container.find('.pass-change-verifyCode').hide();           
                    container.find('.error-area').hide();
                    //container.find('form:eq(1)').find(".lg_error_msg").html('请输入验证码');
                    step = 60;
                    countDown(container);
                } else {
                    // container.find('.error-area').show();
                    container.find('#login_error_phone').show();
                    container.find('form:eq(1)').find(".lg_error_msg").html('<i class="error-area-ico"></i>'+json.message);
                }
            },
            'error' : function (err) {
                var err = $.parseJSON(err.responseText);
                $('.lg_change_verify2[is_click="1"]').trigger('click');
                if (err.message) {
                    // container.find('.error-area').show();
                    container.find('#login_error_phone').show();
                    container.find('form:eq(1)').find(".lg_error_msg").html('<i class="error-area-ico"></i>'+err.message);
                }
                if (err.code == -3 || err.code == -4) {
                    container.find('input[name="lg_verify2"]').parent().show();
                    //container.find('input[name="lg_verify2"]').val('');
                    //container.find('input[name="lg_verify2"]').blur();
                    // container.find('.pass-change-verifyCode').show();
                    container.find('a[id="lg_change_verify2"]').parent().show();
                } else {
                    //window.location.reload();
                }
            }
        });
        return false;
    });

    $('#doLogin').live('click', function() {
        var container = $(this).parent().parent();
        var phone = container.find('input[name="lg_phone2"]').val();
        var code  = container.find('input[name="lg_code"]').val();
        var phonereg = /^1[34578]\d{9}$/;
        if (phone == "") {
            // container.find('.error-area').show();
            container.find('#login_error_phone').show();
            // container.find(".lg_error_msg").html('<i class="error-area-ico"></i>请输入手机号');
            container.find("#lg_error_msg_phone").html('<i class="error-area-ico"></i>请输入手机号');
            return false;
        }
        if (!phonereg.test(phone)) {
            // container.find('.error-area').show();
            container.find('#login_error_phone').show();
            // container.find(".lg_error_msg").html('<i class="error-area-ico"></i>请输入正确的手机号');
            container.find("#lg_error_msg_phone").html('<i class="error-area-ico"></i>请输入正确的手机号');
            return false;
        }
        if (code == "") {
            // container.find('.error-area').show();
            container.find('#login_error_phone').show();
            // container.find(".lg_error_msg").html('<i class="error-area-ico"></i>请输入验证码');
            container.find("#lg_error_msg_phone").html('<i class="error-area-ico"></i>请输入验证码');
            return false;
        }
        $.ajax({
            'type' : 'POST',
            'url'  : '/api/v1/client/login/',
            'data' : {
                mobile:phone,
                code:code
            },
            'dataType' : 'json',
            'success' : function (json) {
                var nav = $('.nav').attr('data');
                if (nav == 'index') {
                    window.location.href = $('.zhiweiCity').attr('href');
                } else {
                    window.location.reload();
                }
            },
            'error' : function (json) {
                var jsonmsg = $.parseJSON(json.responseText);

                if (-208 == jsonmsg.code) {
                    window.alert(jsonmsg.message); 
                    window.location.reload();
                } else {
                    // container.find('.error-area').show();
                    container.find('#login_error_phone').show();
                    // container.find(".lg_error_msg").html('<i class="error-area-ico"></i>'+jsonmsg.message);
                    container.find("#lg_error_msg_phone").html('<i class="error-area-ico"></i>'+jsonmsg.message);
                }
            }
        });
        return false;
    });

    $('#doLoginPassword').live('click', function() {
        var container = $(this).parent().parent();
        var phone = container.find('input[name="lg_phone"]').val();
        //if('placeholder' in document.createElement('input')){
            var password = container.find('input:password[name="lg_pass"]').val();
        //} else {
        //    var password = container.find('input:text[name="lg_pass"]').val();
        //}
        var verify   = container.find('input[name="lg_verify"]').val();
        if (verify == "输入图片验证码") {
            verify = ''
        }

        var phonereg = /^1[34578]\d{9}$/;
        var passwordreg = /^[0-9A-Za-z]{6,}$/;
        var verifyreg = /^\w{4}$/i;
        if (phone == "") {
            // container.find('.error-area').show();
            // container.find(".lg_error_msg").html('<i class="error-area-ico"></i>请输入手机号');
            container.find('#login_error_pwd').show();
            container.find("#lg_error_msg_pwd").html('<i class="error-area-ico"></i>请输入手机号');
            return false;
        }
        if (password == "") {
            // container.find('.error-area').show();
            // container.find(".lg_error_msg").html('<i class="error-area-ico"></i>请输入密码');
            container.find('#login_error_pwd').show();
            container.find("#lg_error_msg_pwd").html('<i class="error-area-ico"></i>请输入密码');
            return false;
        }
        if (!phonereg.test(phone)) {
            // container.find('.error-area').show();
            // container.find(".lg_error_msg").html('<i class="error-area-ico"></i>请输入正确的手机号');
            container.find('#login_error_pwd').show();
            container.find("#lg_error_msg_pwd").html('<i class="error-area-ico"></i>请输入正确的手机号');
            return false;
        }
        if (!passwordreg.test(password)) {
            // container.find('.error-area').show();
            // container.find(".lg_error_msg").html('<i class="error-area-ico"></i>请输入正确的密码');
            container.find('#login_error_pwd').show();
            container.find("#lg_error_msg_pwd").html('<i class="error-area-ico"></i>请输入正确的密码');
            return false;
        }
        if (verify.length == 4 && !verifyreg.test(verify)) {
            // container.find('.error-area').show();
            // container.find(".lg_error_msg").html('<i class="error-area-ico"></i>'+'图片验证码错误！');
            container.find('#login_error_pwd').show();
            container.find("#lg_error_msg_pwd").html('<i class="error-area-ico"></i>'+'图片验证码错误！');
            return false;
        }
        if (!container.find('input[name="lg_verify"]').parent().is(':hidden') && verify == "") {
            // container.find('.error-area').show();
            // container.find(".lg_error_msg").html('<i class="error-area-ico"></i>'+'请输入验证码');
            container.find('#login_error_pwd').show();
            container.find("#lg_error_msg_pwd").html('<i class="error-area-ico"></i>'+'请输入验证码');
            return false;
        }
        $.ajax({
            'type' : 'POST',
            'url'  : '/api/v1/client/loginwithpassword',
            'data' : {mobile:phone, password:password, code:verify},
            'dataType' : 'json',
            'success' : function (json) {
                // if (json.userId >= 0) {
                //     container.parents('.login-pop').parent().find('.login-pop').hide();
                    // $('.c-pop').show();
                    // $('.c-pop').find('.success').text('登录成功');
                    // $('.js-modal-close').live('click', function(){window.location.reload();});
                //     window.location.reload();
                // } else {
                //     container.parents('.login-pop').parent().find('.login-pop').hide();
                    // $('.c-pop').show();
                    // $('.c-pop').find('.success').text(json.message);
                    // $('.js-modal-close').live('click', function(){window.location.reload();});
                //     window.location.reload();
                // }
                nav = $('.nav').attr('data');
                if (nav == 'index') {
                    window.location.href = $('.zhiweiCity').attr('href');
                } else {
                    window.location.reload();
                }
            },
            'error' : function (json) {
                var jsonmsg = $.parseJSON(json.responseText);
                container.find('img[name="lg_verify_img"]').attr('src', '/api/v1/client/showCkCodeV2?rand=' + Math.random());
                if (jsonmsg.message && jsonmsg.code != -3) {
                    // container.find('.error-area').show();
                    // container.find(".lg_error_msg").html('<i class="error-area-ico"></i>'+jsonmsg.message);
                    container.find('#login_error_pwd').show();
                    container.find("#lg_error_msg_pwd").html('<i class="error-area-ico"></i>'+jsonmsg.message);                    
                }
                if (jsonmsg.code == -3) {
                    // container.find('.error-area').show();
                    // container.find(".lg_error_msg").html('请输入验证码');
                    container.find('#login_error_pwd').show();
                    container.find("#lg_error_msg_pwd").html('<i class="error-area-ico"></i>请输入验证码');
                    $('.modal-account').removeClass('account-phone account-register account-modify').addClass('account-password');
                    container.find('input[name="lg_verify"]').parent().show();
                    container.find('input[name="lg_verify"]').val('');
                    container.find('img[name="lg_verify_img"]').attr('src', '/api/v1/client/showCkCodeV2?rand=' + Math.random());
                    // container.find('.pass-change-verifyCode').show();
                    container.find('a[id="lg_change_verify"]').parent().show();
                } else {
                    //window.location.reload();
                }
            }
        });
        return false;
    });

    $('#lg_change_verify').live('click', function(){
        $(this).parents('.login-pop').find('input[name="lg_verify"]').val('');
        $(this).parents('.login-pop').find('img[name="lg_verify_img"]').attr('src', '/api/v1/client/showCkCodeV2?rand=' + Math.random());
    });

    $('#lg_change_verify2').live('click', function(){
        $(this).parents('.login-pop').find('input[name="lg_verify2"]').val('');
        $(this).parents('.login-pop').find('img[name="lg_verify_img2"]').attr('src', '/api/v1/client/showCkCodeV2?rand=' + Math.random());
    });

    $('#doRegister').live('click', function(){
        var container = $(this).parents('.login-pop');
        var phone     = container.find('input[name="re_phone"]').val();
        //if('placeholder' in document.createElement('input')){
            var password = container.find('input:password[name="re_pass"]').val();
        //} else {
        //    var password = container.find('input:text[name="re_pass"]').val();
        //}
        var code      = container.find('input[name="re_code"]').val();
        var phonereg = /^1[34578]\d{9}$/;
        var passwordreg = /^\S{6,12}$/;
        var passwordreg2= /^\d+$/;
        var passwordreg3= /^(\S)\1{5,11}$/;
        var codereg  = /^\d{6}$/;
        if (!phonereg.test(phone)) {
            container.find('.error-area').show();
            container.find(".lg_error_msg").html('<i class="error-area-ico"></i>请输入正确的手机号');
            return false;
        }
        if (password == "") {
            container.find('.error-area').show();
            container.find(".lg_error_msg").html('<i class="error-area-ico"></i>请输入密码');
            return false;
        }
        if (password.length != password.replace(' ', '').length) {
            container.find('.error-area').show();
            container.find(".lg_error_msg").html('<i class="error-area-ico"></i>密码不能包含空格');
            return false;
        }
        if (!passwordreg.test(password)) {
            container.find('.error-area').show();
            container.find(".lg_error_msg").html('<i class="error-area-ico"></i>请输入6-12位非纯数字密码');
            return false;
        }
        if (passwordreg2.test(password)) {
            container.find('.error-area').show();
            container.find(".lg_error_msg").html('<i class="error-area-ico"></i>请勿输入纯数字密码');
            return false;
        }
        if (passwordreg3.test(password)) {
            container.find('.error-area').show();
            container.find(".lg_error_msg").html('<i class="error-area-ico"></i>请勿使用单一重复字符密码');
            return false;
        }
        if (code == "") {
            container.find('.error-area').show();
            container.find(".lg_error_msg").html('<i  class="error-area-ico"></i>请输入验证码');
            return false;
        }
        if (!codereg.test(code)) {
            container.find('.error-area').show();
            container.find(".lg_error_msg").html('<i  class="error-area-ico"></i>请输入正确的验证码');
            return false;
        }
        $.ajax({
            'type' : 'POST',
            'url'  : '/api/v1/client/register/',
            'data' : {
                mobile:phone, 
                password:password, 
                code:code,
                qr_code_type: window.PAGE_CONFIG.fromInfo.qr_code_type,
                qr_code_invite: window.PAGE_CONFIG.fromInfo.qr_code_invite,
                ca_campaign: ''
            },
            'dataType' : 'json',
            'success' : function (json) {
                // if (json.code == 1) {
                //     container.parent().find('.login-pop').hide();
                    // $('.c-pop').show();
                    // $('.c-pop').find('.success').text('注册成功');
                    // $('.js-modal-close').live('click', function(){window.location.reload();});
                    // window.location.reload();
                // } else {
                    // container.parent().find('.login-pop').hide();
                    // $('.c-pop').show();
                    // $('.c-pop').find('.success').text(json.message);
                    // $('.js-modal-close').live('click', function(){window.location.reload();});
                    // window.location.reload();
                // }

                nav = $('.nav').attr('data');
                if (nav == 'index') {
                    window.location.href = $('.zhiweiCity').attr('href');
                } else {
                    window.location.reload();
                }
            },
            'error' : function (err) {
                var err = $.parseJSON(err.responseText);
                if (err.message && (err.code != -3 && err.code != -4)) {
                    container.find('.error-area').show();
                    container.find(".lg_error_msg").html('<i class="error-area-ico"></i>'+err.message);
                }

                if (err.code == -3 || err.code == -4) {
                    container.find('.error-area').hide();
                    //container.find(".lg_error_msg").html('请输入验证码');
                    container.find('input[name="re_verify"]').parent().show();
                    container.find('input[name="re_verify"]').val('');
                    container.find('img[name="re_verify_img"]').attr('src', '/api/v1/client/showCkCodeV2?rand=' + Math.random());
                    // container.find('.pass-change-verifyCode').show();
                    container.find('a[id="re_change_verify"]').parent().show();
                } else {
                    //window.location.reload();
                }
            }
        });

        return false;
    });

    $('#doForget').live('click', function(){
        var container = $(this).parents('.login-pop');
        var phone     = container.find('input[name="fg_phone"]').val();
        //if('placeholder' in document.createElement('input')){
            var password = container.find('input:password[name="fg_pass"]').val();
        //} else {
        //    var password = container.find('input:text[name="fg_pass"]').val();
        //}
        var code      = container.find('input[name="fg_code"]').val();
        var phonereg = /^1[34578]\d{9}$/;
        var passwordreg = /^\S{6,12}$/;
        var passwordreg2= /^\d+$/;
        var passwordreg3= /^(\S)\1{5,11}$/;
        var codereg  = /^\d{6}$/;
        if (!phonereg.test(phone)) {
            container.find('.error-area').show();
            container.find(".lg_error_msg").html('<i class="error-area-ico"></i>请输入正确的手机号');
            return false;
        }
        if (password == "") {
            container.find('.error-area').show();
            container.find(".lg_error_msg").html('<i class="error-area-ico"></i>请输入密码');
            return false;
        }
        if (password.length != password.replace(' ', '').length) {
            container.find('.error-area').show();
            container.find(".lg_error_msg").html('<i class="error-area-ico"></i>密码不能包含空格');
            return false;
        }
        if (!passwordreg.test(password)) {
            container.find('.error-area').show();
            container.find(".lg_error_msg").html('<i class="error-area-ico"></i>请输入6-12位非纯数字密码');
            return false;
        }
        if (passwordreg2.test(password)) {
            container.find('.error-area').show();
            container.find(".lg_error_msg").html('<i class="error-area-ico"></i>请勿输入纯数字密码');
            return false;
        }
        if (passwordreg3.test(password)) {
            container.find('.error-area').show();
            container.find(".lg_error_msg").html('<i class="error-area-ico"></i>请勿使用单一重复字符密码');
            return false;
        }
        if (code == "") {
            container.find('.error-area').show();
            container.find(".lg_error_msg").html('<i  class="error-area-ico"></i>请输入验证码');
            return false;
        }
        if (!codereg.test(code)) {
            container.find('.error-area').show();
            container.find(".lg_error_msg").html('<i  class="error-area-ico"></i>请输入正确的验证码');
            return false;
        }
        $.ajax({
            'type' : 'POST',
            'url'  : '/api/v1/client/forget/',
            'data' : {mobile:phone, password:password, code:code},
            'dataType' : 'json',
            'success' : function (json) {
                if (json.code == 1) {
                    container.parent().find('.login-pop').hide();
                    
                    $('.win_success').show();                    
                    $('.win_success').find('.success_tag').text('恭喜，重置密码成功');
                    $('.win_success').find('.btn').text('直接登录');

                    $('.js-modal-close').live('click', function(){
                        // window.location.reload();
                        nav = $('.nav').attr('data');
                        if (nav == 'index') {
                            window.location.href = $('.zhiweiCity').attr('href');
                        } else {
                            window.location.reload();
                        }
                    });
                } else {
                    container.parent().find('.login-pop').hide();

                    $('.win_success').show();                    
                    // $('.win_success').find('.success').text(json.message);
                    $('.win_success').find('.success_tag').text('恭喜，重置密码成功');
                    $('.win_success').find('.btn').text('直接登录');

                    $('.js-modal-close').live('click', function(){
                        // window.location.reload();
                        nav = $('.nav').attr('data');
                        if (nav == 'index') {
                            window.location.href = $('.zhiweiCity').attr('href');
                        } else {
                            window.location.reload();
                        }
                    });
                }
            },
            'error' : function (err) {
                var err = $.parseJSON(err.responseText);
                if (err.message && (err.code != -3 && err.code != -4)) {
                    container.find('.error-area').show();
                    container.find(".lg_error_msg").html('<i class="error-area-ico"></i>'+err.message);
                }

                if (err.code == -3 || err.code == -4) {
                    //container.find(".lg_error_msg").html('请输入验证码');
                    container.find('.error-area').hide();
                    container.find('input[name="fg_verify"]').parent().show();
                    container.find('input[name="fg_verify"]').val('');
                    container.find('img[name="fg_verify_img"]').attr('src', '/api/v1/client/showCkCodeV2?rand=' + Math.random());
                    // container.find('.pass-change-verifyCode').show();
                    container.find('a[id="fg_change_verify"]').parent().show();
                }
            }
        });

        return false;
    });

    $('#btn_success').live('click', function(){
        nav = $('.nav').attr('data');
        if (nav == 'index') {
            window.location.href = $('.zhiweiCity').attr('href');
        } else {
            window.location.reload();
        }
    });
    
    $('#btn_register').live('click', function(){
        $('.modal-account').removeClass('account-phone account-password account-modify').addClass('account-register');
        var container = $(this).parents('.login-pop').parent();
        container.find('.login-pop').hide();
        $('.js-modal-title').text('注册');
        container.find('.login-pop[id="win_register"]').show();
    });
    
    $('#btn_forget').live('click', function(){
        $('.modal-account').removeClass('account-phone account-register account-password').addClass('account-modify');
        var container = $(this).parents('.login-pop').parent();
        container.find('.login-pop').hide();
        $('.js-modal-title').text('忘记密码');
        container.find('.login-pop[id="win_forget"]').show();
    });

    $('#btn_login').live('click', function(){
        $('.modal-account').removeClass('account-phone account-register account-modify').addClass('account-password');
        var container = $(this).parents('.login-pop').parent();
        container.find('.login-pop').hide();
        $('.js-modal-title').text('登录');
        container.find('.login-pop[id="win_login"]').show();
        container.find('.login-pop[id="win_login"]').find('.login-header').find('span').removeClass('active');
        container.find('.login-pop[id="win_login"]').find('.login-header').find('span:eq(0)').addClass('active');
        container.find('.login-pop[id="win_login"]').find('form').hide();
        container.find('.login-pop[id="win_login"]').find('form:eq(0)').show();
    });

    $('#re_get_code').live('click', function (){
        var container = $(this).parents('.login-pop');
        var phone = container.find('input[name="re_phone"]').val();
        var phonereg  = /^1[34578]\d{9}$/;
        var iserror = (container.find(".lg_error_msg").html().replace('<i class="error-area-ico"></i>','').length != container.find(".lg_error_msg").html().length)?true:false;
        if (!phonereg.test(phone)) {
            container.find('.error-area').show();
            container.find(".lg_error_msg").html('<i class="error-area-ico"></i>请输入正确的手机号');
            return false;
        } else {
            container.find('.error-area').hide();
            container.find(".lg_error_msg").html('使用手机号注册');
        }
        $.ajax({
            'type' : 'POST',
            'url'  : '/api/v1/client/authCkCode/',
            'data' : {mobile:phone},
            'dataType' : 'json',
            'success' : function (json) {
                if (json.code == 0) {
                    step = 60;
                    countDown(container);
                    container.find(".lg_error_msg").html('请输入验证码');
                    container.find('input[name="re_verify"]').parent().hide();
                    container.find('.pass-change-verifyCode').hide();
                } else {
                    container.find('.error-area').show();
                    container.find(".lg_error_msg").html('<i class="error-area-ico"></i>'+json.message);
                }
            },
            'error' : function (err) {
                var err = $.parseJSON(err.responseText);
                if (err.message && err.code != -3 && err.code != -4) {
                    container.find('.error-area').show();
                    container.find(".lg_error_msg").html('<i class="error-area-ico"></i>'+err.message);
                }

                if (err.code == -3 || err.code == -4) {
                    var ishidden = container.find('img[name="re_verify_img"]').parent().parent().is(":hidden");
                    container.find('input[name="re_verify"]').parent().show();
                    if (container.find('img[name="re_verify_img"]').attr('src') == "" || ishidden || iserror) {
                        container.find('input[name="re_verify"]').val('');
                        container.find('img[name="re_verify_img"]').attr('src', '/api/v1/client/showCkCodeV2?rand=' + Math.random());
                    }
                    // container.find('.pass-change-verifyCode').show();
                    container.find('a[id="re_change_verify"]').parent().show();
                    container.find('a[id="re_change_verify"]').attr('is_click', '1');
                } else {
                    //window.location.reload();
                }
            }
        });
        return false;
        
    });

    $('#re_verify').live('keyup', function() {
        var container = $(this).parents('.login-pop');
        var phone  = container.find('input[name="re_phone"]').val();
        var verify = $(this).val();
        var phonereg  = /^1[34578]\d{9}$/;
        var verifyreg = /^\w{4}$/i;
        if (!phonereg.test(phone)) {
            return false;
        }
        if (verify.length < 4 || verify.length > 4) {
            return false;
        }
        if (verify.length = 4 && !verifyreg.test(verify)) {
            //container.find('input[name="re_verify"]').val('');
            //container.find('input[name="re_verify"]').blur();
            container.find('.error-area').show();
            container.find(".lg_error_msg").html('<i class="error-area-ico"></i>'+'图片验证码错误！');
            return false;
        }
        $.ajax({
            'type' : 'POST',
            'url'  : '/api/v1/client/authCkCode/',
            'data' : {mobile:phone, code:verify},
            'dataType' : 'json',
            'success' : function (json) {
                if (json.code == 0) {
                    container.find('input[name="re_verify"]').parent().hide();
                    container.find('.pass-change-verifyCode').hide();           
                    container.find(".lg_error_msg").html('请输入验证码');
                    step = 60;
                    countDown(container);
                } else {
                    container.find('.error-area').show();
                    container.find(".lg_error_msg").html('<i class="error-area-ico"></i>'+json.message);
                }
            },
            'error' : function (err) {
                var err = $.parseJSON(err.responseText);
                $('.re_change_verify[is_click="1"]').trigger('click');
                if (err.message) {
                    container.find('.error-area').show();
                    container.find(".lg_error_msg").html('<i class="error-area-ico"></i>'+err.message);
                }

                if (err.code == -3 || err.code == -4) {
                    container.find('input[name="re_verify"]').parent().show();
                    //container.find('input[name="re_verify"]').val('');
                    //container.find('input[name="re_verify"]').blur();
                    // container.find('.pass-change-verifyCode').show();
                    container.find('a[id="re_change_verify"]').parent().show();
                } else {
                    //window.location.reload();
                }
            }
        });
        return false;
    });
    
    $('#re_change_verify').live('click', function(){
        $(this).parents('.login-pop').find(".error-area").hide();
        $(this).parents('.login-pop').find(".lg_error_msg").html('');
        $(this).parents('.login-pop').find('input[name="re_verify"]').val('');
        $(this).parents('.login-pop').find('img[name="re_verify_img"]').attr('src', '/api/v1/client/showCkCodeV2?rand=' + Math.random());
    });
    
    $('#fg_get_code').live('click', function (){
        var container = $(this).parents('.login-pop');
        var phone = container.find('input[name="fg_phone"]').val();
        var phonereg  = /^1[34578]\d{9}$/;
        var iserror = (container.find(".lg_error_msg").html().replace('<i class="error-area-ico"></i>','').length != container.find(".lg_error_msg").html().length)?true:false;
        if (!phonereg.test(phone)) {
            container.find('.error-area').show();
            container.find(".lg_error_msg").html('<i class="error-area-ico"></i>请输入正确的手机号');
            return false;
        } else {
            container.find('.error-area').hide();
            container.find(".lg_error_msg").html('使用手机号找回密码');
        }
        $.ajax({
            'type' : 'POST',
            'url'  : '/api/v1/client/authCkCode/',
            'data' : {mobile:phone},
            'dataType' : 'json',
            'success' : function (json) {
                if (json.code == 0) {
                    step = 60;
                    countDown(container);
                    container.find(".lg_error_msg").html('<i class="error-area-ico"></i>请输入验证码');
                    container.find('input[name="fg_verify"]').parent().hide();
                    container.find('.pass-change-verifyCode').hide();
                } else {
                    container.find('.error-area').show();
                    container.find(".lg_error_msg").html('<i class="error-area-ico"></i>'+json.message);
                }
            },
            'error' : function (err) {
                var err = $.parseJSON(err.responseText);
                if (err.message && err.code != -3 && err.code != -4) {
                    container.find('.error-area').show();
                    container.find(".lg_error_msg").html('<i class="error-area-ico"></i>'+err.message);
                }

                if (err.code == -3 || err.code == -4) {
                    var ishidden = container.find('img[name="fg_verify_img"]').parent().parent().is(":hidden");
                    container.find('input[name="fg_verify"]').parent().show();
                    if (container.find('img[name="fg_verify_img"]').attr('src') == "" || ishidden || iserror) {
                        container.find('input[name="fg_verify"]').val('');
                        container.find('img[name="fg_verify_img"]').attr('src', '/api/v1/client/showCkCodeV2?rand=' + Math.random());
                    }
                    // container.find('.pass-change-verifyCode').show();
                    container.find('a[id="fg_change_verify"]').parent().show();
                    container.find('a[id="fg_change_verify"]').attr('is_click', '1');
                } else {
                    //window.location.reload();
                }
            }
        });
        return false;
        
    });

    $('#fg_verify').live('keyup', function() {
        var container = $(this).parents('.login-pop');
        var phone  = container.find('input[name="fg_phone"]').val();
        var verify = $(this).val();
        var phonereg  = /^1[34578]\d{9}$/;
        var verifyreg = /^\w{4}$/i;
        if (!phonereg.test(phone)) {
            return false;
        }
        if (verify.length < 4 || verify.length > 4) {
            return false;
        }
        if (verify.length = 4 && !verifyreg.test(verify)) {
            //container.find('input[name="fg_verify"]').val('');
            //container.find('input[name="fg_verify"]').blur();
            container.find('.error-area').show();
            container.find(".lg_error_msg").html('<i class="error-area-ico"></i>'+'图片验证码错误！');
            return false;
        }
        $.ajax({
            'type' : 'POST',
            'url'  : '/api/v1/client/authCkCode/',
            'data' : {mobile:phone, code:verify},
            'dataType' : 'json',
            'success' : function (json) {
                if (json.code == 0) {
                    container.find('input[name="fg_verify"]').parent().hide();
                    container.find('.pass-change-verifyCode').hide();           
                    container.find(".lg_error_msg").html('请输入验证码');
                    step = 60;
                    countDown(container);
                } else {
                    container.find('.error-area').show();
                    container.find(".lg_error_msg").html('<i class="error-area-ico"></i>'+json.message);
                }
            },
            'error' : function (err) {
                var err = $.parseJSON(err.responseText);
                $('.fg_change_verify[is_click="1"]').trigger('click');
                if (err.message) {
                    container.find('.error-area').show();
                    container.find(".lg_error_msg").html('<i class="error-area-ico"></i>'+err.message);
                }

                if (err.code == -3 || err.code == -4) {
                    container.find('input[name="fg_verify"]').parent().show();
                    //container.find('input[name="fg_verify"]').val('');
                    //container.find('input[name="fg_verify"]').blur();
                    
                    // container.find('.pass-change-verifyCode').show();
                    container.find('a[id="fg_change_verify"]').parent().show();
                } else {
                    //window.location.reload();
                }
            }
        });
        return false;
    });
    
    $('#fg_change_verify').live('click', function(){
        $(this).parents('.login-pop').find(".error-area").hide();
        $(this).parents('.login-pop').find(".lg_error_msg").html('');
        $(this).parents('.login-pop').find('input[name="fg_verify"]').val('');
        $(this).parents('.login-pop').find('img[name="fg_verify_img"]').attr('src', '/api/v1/client/showCkCodeV2?rand=' + Math.random());
    });
    
    var ctime = null;
    function countDown(obj) {
        if (step == 0) {
            obj.find('.get-dynamic-pass[data-btn="get_code_n"]').hide();
            obj.find('.get-dynamic-pass[data-btn="get_code_y"]').show();
            step = 60;
        } else {
            obj.find('.get-dynamic-pass[data-btn="get_code_n"]').show();
            obj.find('.get-dynamic-pass[data-btn="get_code_y"]').hide();
            obj.find('.get-dynamic-pass[data-btn="get_code_n"]').html(step+'秒后重试');
            step--;
            ctime = setTimeout(function(){countDown(obj)}, 1000);
        }
    };
});
GJ.use('app/common/widget/widget.js', function(widget) {
    widget.initWidgets();
    
    $('.dropdown').hover(function() {
        $(this).addClass('active');
    }, function() {
        $(this).removeClass('active');
    });
});
</script>






    <!-- entry-form start -->
    <div id="apply_content" name="apply_content" style="display:none">
        <div class="jz-warning-tips">
            <p class="fc-f60 cityNotEqual" style="display:none"><i class="warning-tips-ico"></i>本职位只在<span></span>招聘，请确认后再报名</p>
            <p data-value="no-fee-tips">温馨提示：正规兼职不会收取费用，若收费请提高警惕！</p>
        </div>
        <form name="" method="" action="">
            <div class="jz-info mb-30">
                <div class="jz-t">
                    <h2>确认工作时间和地点</h2>
                </div>
                <div class="jz-info-con">
                    <div class="item clearfix lh1" style="line-height:24px;">
                        <label class="title">工作日期</label><span class="apply_win_work_time" style="display:block;margin-left:135px"></span>
                    </div>
                    <div class="item clearfix lh1 apply_win_job_demand_box" style="line-height:24px; display:none">
                        <label class="title">工作要求</label><span class="apply_win_job_demand" style="display:block;margin-left:135px"></span>
                    </div>
                    <div class="item clearfix working_hours" style="display:none">
                        <label class="title">工作时间</label>
                        <div class="form-select-wrap fl">
                            <select style="color: #aaa;" class="w318 working_hours_select checkInput" name="working_hours_select">
                                <option value="" disabled='disabled'>请选择时间</option>
                            </select>
                        </div>
                        <span class="validatorError" name="workHoursError" style="display:none"></span>
                    </div>
                    <div class="item clearfix">
                        <label class="title">选择地点</label>
                        <div class="form-select-wrap fl">
                            <select style="color: #aaa;" class="w318 post_addr_select checkInput" name="post_addr_select">
                                <option value="" disabled='disabled'>请选择工作地点</option>
                            </select>
                        </div>
                        <span class="validatorError" name="workAddrError" style="display:none"></span>
                    </div>
                </div>
            </div>
            <div class="apply_win_content" style="display:none">
                <div class="jz-info">
                    <div class="jz-t">
                        <h2>填写资料并验证手机，可更快上岗并确保工资到账</h2>
                    </div>
                    <div class="jz-info-con">
                        <div class="apply_win_restrict_name_sex" style="display:none">
                            <div class="item clearfix">
                                <label class="title">姓名性别</label>
                                <input type="text" placeholder="请填写真实姓名" value="" name="realname" class="jz-txt fl mr-10 w130 checkInput">
                                <label class="fl mr-20"><input type="radio" name="gender"  class="jz-radio checkInput" value="1">男</label>
                                <label class="fl"><input type="radio" name="gender"  class="jz-radio checkInput" value="2">女</label>
                                <span class="validatorError" name="nameError" style="display:none"></span>
                                <span class="validatorError" name="genderError" style="display:none"></span>
                            </div>
                        </div>
                        <div class="apply_win_restrict_age_identity" style="display:none">
                            <div class="item clearfix">
                                <label class="title">年龄身份</label>
                                <div class="form-select-wrap fl mr-10">
                                    <select style="color: #aaa;" class="w150 checkInput" name="birthDate">
                                        <option class="dateOfbirth" value="0">请选择出生年份</option>
                                    </select>
                                </div>
                                <label class="fl mr-20"><input type="radio" name="identity"  class="jz-radio checkInput" value="1">学生</label>
                                <label class="fl"><input type="radio" name="identity"  class="jz-radio checkInput" value="0">非学生</label>
                                <span class="validatorError" name="birthError" style="display:none"></span>
                                <span class="validatorError" name="identityError" style="display:none"></span>
                            </div>
                        </div>
                        <div class="apply_win_restrict_height_weight" style="display:none">
                            <div class="item clearfix">
                                <label class="title">
                                    <span class="apply_win_restrict_height" style="display:none">身高</span><span class="apply_win_restrict_weight" style="display:none">体重</span>
                                </label>
                                <span class="fl mr-10 apply_win_restrict_height" style="display:none"><input type="" name="height" class="jz-txt w32 mr-5 checkInput" maxlength="3">厘米</span>
                                <span class="fl apply_win_restrict_weight" style="display:none"><input type="" name="weight" class="jz-txt w32 mr-5 checkInput" maxlength="3">公斤</span>
                                <span class="validatorError" name="heightError" style="display:none"></span>
                                <span class="validatorError" name="weightError" style="display:none"></span>
                            </div>
                        </div>
                        <div class="apply_win_restrict_work_ex" style="display:none">
                            <div class="item clearfix">
                                <label class="title">工作经验</label>
                                <div class="jz-select fl">
                                    <div class="current">
                                        <input type="text" placeholder="请选择工作经验" readonly="readonly" name="jobEx" class="jz-sel-txt w272 checkInput">
                                        <i class="jz-sel-arrow"></i>
                                    </div>
                                    <div style="display: none;" class="jz-sel-option">
                                        <ul>
                                            <li><label><input type="checkbox" name="" class="jz-checkbox">发单</label></li>
                                        </ul>
                                    </div>
                                </div>
                                <span class="validatorError" name="demandError" style="display:none"></span>
                            </div>
                        </div>
                        <div class="apply_win_restrict_addr" style="display:none">
                            <div class="item clearfix">
                                <label class="title">居住地址</label>
                                <div class="form-select-wrap fl mr-10">
                                    <select style="color: #aaa;" class="w150 district-option checkInput" name="district">
                                        <option value="0" name="districtDefined">区域</option>
                                                                                <option value="173">海淀</option>
                                                                                <option value="174">朝阳</option>
                                                                                <option value="175">东城</option>
                                                                                <option value="176">西城</option>
                                                                                <option value="177">崇文</option>
                                                                                <option value="178">宣武</option>
                                                                                <option value="179">丰台</option>
                                                                                <option value="180">石景山</option>
                                                                                <option value="185">昌平</option>
                                                                                <option value="183">通州</option>
                                                                                <option value="182">大兴</option>
                                                                                <option value="184">顺义</option>
                                                                                <option value="181">房山</option>
                                                                                <option value="186">密云</option>
                                                                                <option value="190">门头沟</option>
                                                                                <option value="187">怀柔</option>
                                                                                <option value="189">平谷</option>
                                                                                <option value="188">延庆</option>
                                                                                <option value="3283">燕郊</option>
                                                                                <option value="103680">北京周边</option>
                                                                            </select>
                                </div>
                                <div class="form-select-wrap fl">
                                    <select style="color: #aaa;" class="w150 street-option checkInput" name="street">
                                        <option value="0" name="streetDefined">商圈</option>
                                    </select>
                                </div>
                                <span class="validatorError" name="addrError" style="display:none"></span>
                            </div>
                        </div>
                        <div class="apply_win_restrict_entry_date" style="display:none">
                            <div class="item clearfix">
                                <label class="title">上岗时间</label>
                                <div class="jz-date fl">
                                    <input type="text" placeholder="请选择日期" value="" name="entryDate" class="jz-txt w130 job_entry_date checkInput" id="job_entry_date">
                                    <i class="jz-date-ico"></i>
                                </div>
                                <span class="validatorError" name="entryDateError" style="display:none"></span>
                            </div>
                        </div>
                        <div class="apply_win_restrict_healthcert" style="display:none">
                            <div class="item clearfix">
                                <label class="title">健康证</label>
                                <label class="fl mr-20"><input type="radio" name="health" class="jz-radio checkInput" value="1">有</label>
                                <label class="fl"><input type="radio" name="health" class="jz-radio checkInput" value="0">无</label>
                                <span class="validatorError" name="healthError" style="display:none"></span>
                            </div>
                        </div>
                        <div class="win_apply_login" style="display:none">
                            <div class="item clearfix">
                                <label class="title">手机号码</label>
                                <input type="" placeholder="请输入11位手机号" value="" name="apply_phone" class="jz-txt w130 fl checkInput" maxlength="11">
                                <span class="phoneError validatorError"  name="phoneError" style="display:none"></span>
                            </div>
                            <div class="item clearfix">
                                <label class="title">动态密码</label>
                                <input type="" placeholder="动态密码" value="" name="apply_code" class="jz-txt w130 fl mr-10 checkInput" maxlength="6">
                                <a class="btn_gray fl get-dynamic-pass hide" data-btn="get_code_n"></a>
                                <a href="javascript:;" id="get_code" getaction="get_code" class="btn_gray get-dynamic-pass fl" data-btn="get_code_y">获取动态密码</a>
                                <span class="codeError validatorError" name="codeError" style="display:none"></span>
                            </div>
                            <div class="item clearfix" name="win_apply_img_code" style="display:none">
                                <label class="title">图片验证码</label>
                                <input type="" placeholder="输入图片验证码" value="" name="apply_qcode" class="jz-txt w130 fl mr-10" maxlength="4">
                                <img src="" class="verification-code fl">
                                <a href="javascript:;" class="btn_refresh" id="refresh_code">看不清，换一个</a>
                                <span class="qcodeError validatorError" name="qcodeError" style="display:none"></span>
                            </div>
                            <div class="item clearfix" name="win_apply_img_code" style="display:none">
                                <span class="qcodeErrorLast validatorError" name="qcodeErrorLast" style="margin-left:43px;display:none;"></span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="btn-box clearfix">
                <a href="javascript:;" class="btn_submit doApply">完成并报名</a>
                <a class="btn_cancel" href="javascript:;" onClick="applyWinClose()">取消</a>
            </div>
        </form>
    </div>
    <div id="apply_restrict_error_content" style="display:none">
        <div class="c-pop w340">
            <div class="c-pop-txt" name="restrict_text">该岗位只招，与您填写的简历不符</div>
            <div class="c-pop-btn">
                <button class="btn btn-primary" id="apply_restrict_ok">确定</button>
            </div>
        </div>
    </div>
    <div class="apply_restrict_error"></div>
    <div id="isApplySuccessWin"></div>
    <div id="apply_jz_win_show"></div>
    <!-- entry-form end -->
<script type="text/javascript">
    window.USER_ID     = '';
    window.IS_LOGIN    = '';
    window.OLDPOSTID   = '';
    window.CANAPPLY    = '1';
    window.IS_APPLY    = '';
    window.WHEREISPAGE = 'list';
    window.step        = 60;
    window.checkArr    = new Array(); 
    window.checkFlag   = new Array();
    window.is_restrict_win = false;
    window.maxDate     = 0;
    window.applyStep   = 4;
    window.isStepTrue  = 0;
    window.isImgCodeTrue  = 0;
    var setRegError    = function (starr, text, ins) {
        var successClass = "validatorValid";
        var errorClass   = "validatorError";
        var error    = {
            'isEmpty'   : "请填写",
            'notSelect' : "请填选",
            'name'      : "请输入中文或字母",
            'number'    : "只能填写数字",
            'phone'     : "请填写正确的手机号",
            'jobEx'     : "请填选正确的工作经验",
            'deadDate'  : "您的到岗时间不符合该职位要求"
        };

        ins.removeClass(successClass);
        ins.addClass(errorClass);
        
        if (starr['isEmpty']) {
            window.checkFlag.push(false);
            ins.text(error['isEmpty'] + text);
            ins.show();
            return false;
        }
        if (starr['notSelect']) {
            window.checkFlag.push(false);
            ins.text(error['notSelect'] + text);
            ins.show();
            return false;
        }
        starr['isEmpty']   = true;
        starr['notSelect'] = true;
        for (key in starr) {
            if (!starr[key]) {
                window.checkFlag.push(false);
                ins.text(error[key]);
                ins.show();
                return false;
            }
        }
        window.checkFlag.push(true);
        ins.removeClass(errorClass);
        ins.addClass(successClass);
        ins.text('');
    }
    var checkInput = function () {
        //只能是中文或字母
        var regName         = /^[a-zA-Z\u4e00-\u9fa5]{1,20}$/;
        //为空
        var regEmpty        = /^[ ]+$/;
        //电话号码
        var regPhone        = /^1[34578]\d{9}$/;
        //数字
        var regNumber       = /^\d{1,10}$/;
        //到岗日期
        var newTime         = new Date().getTime();
        var regEntryDate    = /^\d{4}(-|\/|\.)\d{1,2}\1\d{1,2}$/;

        var container  = $(this);
        var name       = container.attr("name");
        var value      = container.val();
        var gender     = $('input[name="gender"]:checked').val();
        var health     = $('input[name="health"]:checked').val();
        var identity   = $('input[name="identity"]:checked').val();

        switch (name) {
            case 'post_addr_select':
                var arr = {
                    'number'    : (regNumber.test(value)),
                    'notSelect' : (value == '')
                }
                setRegError(arr, '工作地点', $('span[name="workAddrError"]:last'));
                break;
            case 'working_hours_select':
                var arr = {
                    'regEntryDate' : (regNumber.test(value)),
                    'notSelect'    : (value == '')
                }
                setRegError(arr, '工作时间', $('span[name="workHoursError"]:last'));
                break;
            case 'realname':
                var arr = {
                    'name'        : regName.test(value),
                    'isEmpty'     : (regEmpty.test(value) || value == '')
                }
                setRegError(arr, '真实姓名', $('span[name="nameError"]:last'));
                break;
            case 'gender':
                var arr = {
                    'notSelect'   : (gender != 1 && gender != 2)
                }
                setRegError(arr, '性别', $('span[name="genderError"]:last'));
                break;
            case 'birthDate':
                var arr = {
                    'notSelect'   : (value == 0)
                }
                setRegError(arr, '出生年份', $('span[name="birthError"]:last'));
                break;
            case 'identity':
                var arr = {
                    'notSelect'   : (identity != 1 && identity != 0)
                }
                setRegError(arr, '身份', $('span[name="identityError"]:last'));
                break;
            case 'height':
                var arr = {
                    'number'    : (regNumber.test(value)),
                    'isEmpty'   : (regEmpty.test(value) || value == '')
                }
                setRegError(arr, '身高', $('span[name="heightError"]:last'));
                break;
            case 'weight':
                var arr = {
                    'number'    : (regNumber.test(value)),
                    'isEmpty'   : (regEmpty.test(value) || value == '')
                }
                setRegError(arr, '体重', $('span[name="weightError"]:last'));
                break;
            case 'jobEx':
                var arr = {
                    'notSelect' : (value == '')
                }
                setRegError(arr, '工作经验', $('span[name="demandError"]:last'));
                break;
            case 'district':
                var arr = {
                    'number'    : (regNumber.test(value)),
                    'notSelect' : (value == 0)
                }
                setRegError(arr, '区域', $('span[name="addrError"]:last'));
                break;
            case 'street':
                var arr = {
                    'number'    : (regNumber.test(value)),
                    'notSelect' : (value == 0)
                }
                setRegError(arr, '商圈', $('span[name="addrError"]:last'));
                break;
            case 'entryDate':
                var selectTime = value.replace(/\-/g,"");
                var arr = {
                    'date'      : (regEntryDate.test(value)),
                    'notSelect' : (value == ''),
                    'deadDate' : (window.maxDate >= selectTime)
                }
                if (window.maxDate == 0) {
                    arr['deadDate'] = true;
                }
                setRegError(arr, '到岗时间', $('span[name="entryDateError"]:last'));
                break;
            case 'health':
                var arr = {
                    'notSelect'   : (health != 1 && health != 0)
                }
                setRegError(arr, '健康证', $('span[name="healthError"]:last'));
                break;
            case 'apply_phone':
                var arr = {
                    'phone'     : (regPhone.test(value)),
                    'isEmpty'   : (regEmpty.test(value) || value == '')
                }
                setRegError(arr, '手机号', $('.phoneError:last'));
                break;
            case 'apply_code':
                var arr = {
                    'isEmpty'   : (regEmpty.test(value) || value == '')
                }
                setRegError(arr, '验证码', $('span[name="codeError"]:last'));
                break;
            default:
        }
        //任何时候在下列存在的时候，不显示后续验证
        var nameError = $("span[name='nameError']").text();
        var genderError   = $("span[name='genderError']");
        var birthError = $("span[name='birthError']").text();
        var identityError = $("span[name='identityError']");
        var heightError = $("span[name='heightError']").text();
        var weightError = $("span[name='weightError']");
        if (nameError == '') {
        } else {
            genderError.text('');
        }
        if (birthError == '') {
        } else {
            identityError.text('');
        }
        if (heightError == '') {
        } else {
            weightError.text('');
        }
        return true;
    }
    GJ.use('js/util/modal/confirm.js,js/util/modal/modal.js, js/util/modal/modal.css, js/util/ui_compatible/placeholder.js', function(Modal){
        $('.checkInput').live("blur", checkInput);
        $('.checkInput').live("input propertychange", checkInput);
        $('.checkInput').live("change", checkInput);
        //快速报名窗口
        var apply_page = '';
        apply_page = new Modal({
            $triggerEl: $('#apply_jz_win_show'),
            title:'报名',
            content : $('#apply_content'),
            mask : 'true',
            width:  740,
            height: 500
        });

        //限制提示窗口
        var apply_restrict_page ='';
        apply_restrict_page = new Modal({
            $triggerEl: $('.apply_restrict_error'),
            title:'提示',
            content : $('#apply_restrict_error_content'),
            mask: 'true',
            width : 400,
            height: 130
        });

        //点击确认
        $('#apply_restrict_ok').live('click', function (){
            $('.js-modal-close').trigger('click');
            if (window.IS_LOGIN == '') {
                window.location.reload();
            }
        }); 

        //错误触发
        $('.apply_restrict_error').click(function(){
                //$('.apply_jz_class').trigger('click');
        });

        //如果在报名时点击登录
        if (window.IS_LOGIN != '') {
            if (window.OLDPOSTID != '') {
                var postId   = window.OLDPOSTID;
                var canApply = window.CANAPPLY;
                var isApply  = window.IS_APPLY;
                if (postId != ''){ 
                    if (isApply == 1) { //提交过报名
                        window.OLDPOSTID = '';
                    } else if (isApply == '' && canApply == 1) { //未提交报名 且可以报名
                        var canApplyCount = '3';
                        if (canApplyCount == 0) {
                            $("div[name='restrict_text']").html('每人每天最多投递<em style="color: #fd8000;margin: 0 3px">3</em>个职位,您已经投递满<em style="color: #fd8000;margin: 0 3px">3</em>个职位');
                            $('.js-modal-title').html('提示');
                            $('.apply_restrict_error').trigger("click");
                        } else {
                            $('.apply_jz_class').trigger('click');
                            applyWinShow(postId);
                        }
                    } else if (isApply == '' && canApply == 2) { //未提交报名 且不能报名
                        $('.apply_restrict_error').trigger('click');
                    }
                }
                window.OLDPOSTID = '';
            }
        }

        //登录
        $('.apply_login').live("click", function (){
            $('.js-modal-close').trigger('click');
            $('.jz_lg').trigger('click');
        });

        //快捷登录&注册
        window.doApplyLogin = function() {
            var userId    = 0;
            var phone     = $("input[name='apply_phone']:last").val();
            var code      = $("input[name='apply_code']:last").val();
            var phonereg = /^1[34578]\d{9}$/;
            var successClass = "validatorValid";
            var errorClass   = "validatorError";

            if (phone == "") {
                $(".phoneError:last").removeClass(successClass);
                $(".phoneError:last").addClass(errorClass);
                $('.phoneError:last').show();
                $(".phoneError:last").text('请输入手机号');
                return false;
            }
            if (!phonereg.test(phone)) {
                $(".phoneError:last").removeClass(successClass);
                $(".phoneError:last").addClass(errorClass);
                $('.phoneError:last').show();
                $(".phoneError:last").text('请输入正确的手机号');
                return false;
            }
            if (code == "") {
                $(".codeError:last").removeClass(successClass);
                $(".codeError:last").addClass(errorClass);
                $('.codeError:last').show();
                $(".codeError:last").text('请输入验证码');
                return false;
            }
            $.ajax({
                'type'  : 'POST',
                'url'   : '/api/v1/client/login/',
                'async' : false,
                'data'  : {
                    mobile:phone,
                    code:code
                },
                'dataType' : 'json',
                'success' : function (json) {
                    userId = json.userId;
                    window.USER_ID = json.userId;
                    //var nav = $('.nav').attr('data');
                    //if (nav == 'index') {
                    //    window.location.href = $('.zhiweiCity').attr('href');
                    //}
                },
                'error' : function (json) {
                    var jsonmsg = $.parseJSON(json.responseText);

                    if (-208 == jsonmsg.code) {
                        window.alert(jsonmsg.message);
                        window.location.reload();
                    } else {
                        $(".codeError:last").removeClass(successClass);
                        $(".codeError:last").addClass(errorClass);
                        $('.codeError:last').show();
                        $(".codeError:last").text(jsonmsg.message);
                    }
                }
            });
            return userId;
        };

        //获取动态验证码
        $("input[name='apply_qcode']:last").keyup(function(){
            var container  = $(".win_apply_login:last");
            var length = $(this).val().length;
            if (length == 4) {
                var mobile = $("input[name='apply_phone']:last").val();
                mobile     = 'mobile=' + mobile;
                var code   = $("input[name='apply_qcode']:last").val();
                code       = 'code=' + code;
                postInfo   = mobile + '&' + code; 
                $.ajax({
                    'type' : 'POST',
                    'url'  : 'http://www.doumi.com/api/v1/client/authCkCode/',
                    'data' : postInfo,
                    'dataType' : 'json',
                    'success' : function (json) {
                        window.step = 60;
                        countDown(container);
                        if (window.isImgCodeTrue == 1) {
                            window.winHigh -= 50;
                            window.isImgCodeTrue = 0;
                            $("div[name='win_apply_img_code']").hide();
                            $('.js-modal:gt(1) > .js-modal-content').css("height",window.winHigh+"px");
                        }
                    },
                    'error' : function (json) {
                        var result = $.parseJSON(json.responseText);
                        if (result.code == -206) {
                            $("span[name='qcodeErrorLast']:last").text(result.message);
                            $("span[name='qcodeErrorLast']:last").show();
                            $("span[name='qcodeError']:last").hide();
                            if (window.isStepTrue == 0) {
                                window.winHigh += 40;
                                $('.js-modal:gt(1) > .js-modal-content').css("height",window.winHigh+"px");
                                window.isStepTrue = 1;
                            }
                        } else {
                            $("span[name='qcodeError']:last").text(result.message);
                            $("span[name='qcodeError']:last").addClass("validatorError");
                            $("span[name='qcodeError']:last").removeClass("validatorValid");
                            $("span[name='qcodeError']:last").show();
                            $("span[name='qcodeErrorLast']:last").hide();
                            if (window.isStepTrue == 1) {
                                window.winHigh -= 40;
                                $('.js-modal:gt(1) > .js-modal-content').css("height",window.winHigh+"px");
                                window.isStepTrue = 0;
                            }
                        }
                    }
                });
            }
        });

        //获取验证码，如果超过限制弹出图片验证码
        $("a[getaction='get_code']").click(function(){
            var container  = $(".win_apply_login:last");
            var mobile = $("input[name='apply_phone']:last").val();
            var phonereg = /^1[34578]\d{9}$/;
            if (mobile == "") {
                $(".phoneError:last").removeClass("validatorValid");
                $(".phoneError:last").addClass("validatorError");
                $('.phoneError:last').show();
                $(".phoneError:last").text('请输入手机号');
                return false;
            }
            if (!phonereg.test(mobile)) {
                $(".phoneError:last").removeClass("validatorValid");
                $(".phoneError:last").addClass("validatorError");
                $(".phoneError:last").show();
                $(".phoneError:last").text('请输入正确的手机号');
                return false;
            }
            mobile = 'mobile=' + mobile;
            $.ajax({
                'type' : 'POST',
                'url'  : 'http://www.doumi.com/api/v1/client/authCkCode/',
                'data' : mobile,
                'dataType' : 'json',
                'success' : function (json) {
                   if (json.code == 0) {
                        window.step = 60;
                        countDown(container);
                   }
                },
                'error' : function (json) {
                    var result = $.parseJSON(json.responseText);
                    window.printCode();
                    if (result.name == 'UserError' && result.code == -3) {
                        window.printCode();
                    }
                    if (result.name == 'UserError' && result.code == -203) {
                        $(".phoneError:last").removeClass("validatorValid");
                        $(".phoneError:last").addClass("validatorError");
                        $('.phoneError:last').show();
                        $(".phoneError:last").text('请输入正确的手机号');
                    }
                }
            });
        });

        //重试等待
        function countDown(obj) {
            if (window.step == 0) {
                obj.find('.get-dynamic-pass[data-btn="get_code_n"]').hide();
                obj.find('.get-dynamic-pass[data-btn="get_code_y"]').show();
                window.step = 60;
            } else {
                obj.find('.get-dynamic-pass[data-btn="get_code_n"]').show();
                obj.find('.get-dynamic-pass[data-btn="get_code_y"]').hide();
                obj.find('.get-dynamic-pass[data-btn="get_code_n"]').html(step+'秒后重试');
                window.step--;
                ctime = setTimeout(function(){countDown(obj)}, 1000);
            }
        };

        window.printCode = function (){
            var imgCodeObj = $("div[name='win_apply_img_code']");
            var rand       = Math.random();
            var imgUrl     = 'http://www.doumi.com/api/v1/client/showCkCodeV2?rand=' + rand;
            if (window.isImgCodeTrue == 0) {
                window.winHigh += 50;
                window.isImgCodeTrue = 1;
                $('.js-modal:gt(1) > .js-modal-content').css("height",window.winHigh+"px");
            
            }
            imgCodeObj.children("input").attr("value",'');
            imgCodeObj.children("img").attr("src",imgUrl);
            imgCodeObj.show();
        }

        $("#refresh_code").live("click", function(){
            window.printCode();
        });

        //控制控件状态更改
        //下拉控件
        $('.form-select-wrap > select').change(function (){
            if ($(this).val() != '') {
                $(this).attr("style","color: #4b4b4b");
            } else {
                $(this).attr("style","color: #aaa");
            }
        });
        //工作经验
        $('.jz-sel-arrow').click(function () {
            $('.jz-sel-option').toggle();
        });
        $('.jz-sel-txt').focus(function (){
            $('.jz-sel-option').show();
        });
        $('.jz-sel-option').mouseleave(function (){
            $('.jz-sel-option').hide();
        });
        
        //地区选择控件
        window.districtOption = new Array();
        $('.district-option').change(function (){
            var districtId = $(this).val();
            $('option[name="districtDefined"]').attr("disabled",'disabled');
            $('.street-option').attr("style",'color:#4b4b4b');
            if (typeof window.districtOption[districtId] == 'undefined') {
                getStreetsOption(districtId); 
            } else {
                $('.street-option').html(window.districtOption[districtId]);
            }
        });
        //创建出生日期
        createDateOfBirthOption();

        //作为跳板触发报名弹窗
        //$('#apply_jz_win_show').click();
        
        //点击报名按钮时加载职位数据
        $('.apply_jz_class').click( function () {
            if (window.OLDPOSTID != '' && window.IS_LOGIN != '') {
                return false;
            }
            if (window.applyStep == 4){
                checkApplyStep();
            } else {
                return false;
            }

            window.checkArr = new Array();
            var postId   = $(this).attr('data');
            applyWinShow(postId);
        });
    });

    
    //Cfunction
    //点击报名按钮间隔时间
    var checkApplyStep = function () {
        if (window.applyStep == 0) {
            window.applyStep = 4;
        } else {
            window.applyStep--;
            setTimeout(function(){checkApplyStep()}, 1000);
        }
    }
    //关闭报名表单
    var applyWinClose = function () {
        $('.js-modal-close').trigger('click');
    }
    //弹出报名表单
    var applyWinShow = function (postId) {
        var postId   = postId;
        var postInfo = '';
        _hmt.push(['_trackEvent', 'pc_list_apply_button', 'click', postId]);
        isProfile  = '';
        userHeight = '';
        userWeight = '';
        userAddr   = '';
        userHealth = '';
        userWorkEx = '';
        //初始化操作
        window.winHigh = 0;
        window.jobEx   = '';
        window.DEMAND  = '';
        window.maxDate = 0;
        window.step = 0;
        window.RESTRICTWIN = false;
        window.deadTime = 0;
        window.isImgCodeTrue = 0;
        window.isStepTrue = 0;
        showApplyWin('hide');
        clearApplyInfo();
        clearError();
        $.ajax({
            'type' : 'GET',
            'url'  : 'http://www.doumi.com/api/v1/client/getpostdetail/'+postId+'?isLogin='+window.USER_ID,
            'asycn': false,
            'dataType' : 'json',
            'success' : function (json) {
                postInfo = json;
                userWorkEx = json.ex_workEx;
                window.DEMAND  = json.personnelRestrict;
                //通用信息处理
                var jobType     = json.jobType;
                var postAdType  = json.adType;
                var postAdTypeSpecial  = json.adType_special;
                var direct      = json.directApply || 0;
                if (direct == 1 && postAdTypeSpecial != 1) {
                    directApplyFun(postId, postAdType);
                    return false;
                }
                //工作日期
                var workTimeStr = '';
                if (json.jobDateType == 0) {
                    window.maxDate  = json.endTime;
                   if (json.endTime == 0 || json.startTime == 0) {
                        var startTimeArr     = json.startTimeStr.split(".");
                        var endTimeArr       = json.endTimeStr.split(".");
                        var startDateStr     = startTimeArr[0] + "月" + startTimeArr[1] +"日";
                        var endDateStr       = endTimeArr[0] + "月" + endTimeArr[1] +"日";
                       workTimeStr          = startDateStr + '-' + endDateStr + ' (共 1 天)';
                    } else {
                        workTimeStr = dateFormat(json.startTime, json.endTime);
                    }
                } else if(json.jobDateType == 1){
                    workTimeStr = json.longterm;
                }
                window.winHigh += 30
                $('.apply_win_work_time').text(workTimeStr);
        
                if(!json.isCityEqual) {
                    $('.cityNotEqual span').text(json.postCityName);
                    $('.cityNotEqual').show();
                }
                //工作时间
                if (json.workingHours.length >= 1) {
                    var optionList = '';
                    if (json.workingHours.length > 1) {
                        optionList = '<option value="">请选择时间</option>';
                    } else {
                        $('.working_hours_select').attr("style","color:#4b4b4b");
                    }
                    for(var i in json.workingHours) {
                        var glue          = '-';
                        var workStartTime = json.workingHours[i].am_time;
                        var workEndTime   = json.workingHours[i].pm_time;
                        optionList += '<option value="'+ json.workingHours[i].id +'">'
                            + json.workingHours[i].prefix + ' '
                            + workStartTime
                            + glue
                            + json.workingHours[i].infix
                            + workEndTime
                            + '</option>';
                    }
                    $('.working_hours_select').html(optionList);
                    $('.working_hours').show();
                    window.winHigh += 15;
                    checkPush('working_hours_select');
                } else {
                    $('.working_hours').hide();
                }
                //工作需求
                if (json.demandTags.length >= 1) {
                    var jobDemand   = '';
                    var arrLength   = json.demandTags.length;
                    var glue        = ',';
                    for(var i in json.demandTags) {
                        if (parseInt(i)+1  == arrLength) {
                            glue = '';
                        }
                        if (i > 6) {
                            window.winHigh += 10;
                        }
                        jobDemand += json.demandTags[i] + glue;
                    }
                    $('.apply_win_job_demand').text(jobDemand);
                    $('.apply_win_job_demand_box').show();
                    window.winHigh += 15;
                } else {
                    $('.apply_win_job_demand_box').hide();
                }
                //面试地址
                var optionList = '';
                if (json.addr.length > 1) {
                    optionList = '<option value="">请选择工作地点</option>';
                } else {
                    $('.post_addr_select').attr("style","color:#4b4b4b");
                }
                for(var i in json.addr) {
                    var glue         = '';
                    var city         = json.addr[i].city_name;
                    var address      = json.addr[i].address; 
                    var district_name = json.addr[i].district_name;
                    if (city != '') {
                        glue         = ' ';
                    }
                    optionList += '<option value="'+ (json.addr[i].id==undefined?0:json.addr[i].id) +'">' +  address + glue + '('+ city + glue + district_name + ')' +'</option>';
                }
                $('.post_addr_select').html(optionList);

                window.winHigh += 118;

                //start
                    checkPush('post_addr_select');
                //未登录
                if (window.IS_LOGIN == '') {
                    showApplyWin([1,2,8,10,]);
                    window.winHigh += 290;
                    window.RESTRICTWIN = true;
                    checkPush('gender');
                    checkPush('realname');
                    checkPush('identity');
                    checkPush('birthDate');
                    checkPush('apply_phone');
                    checkPush('apply_code');
                    checkPush('apply_code');
                    var canApplyNumber = 3;
                    var winTitle = '快速报名<span>（今日还可报名<em>'+canApplyNumber+'</em>次）</span><span>有账号<a href="javascript:;" class="apply_login" rel="nofollow" dmalog="/jianzhi/dmtg/index@atype=click@ca_source=pc@ca_from=banner">去登录</a></span>';
                }
                //已登录
                if (window.IS_LOGIN != '') {
                    //无简历
                    if (isProfile == '') {
                        showApplyWin([1,2,10,]);
                        window.RESTRICTWIN = true;
                        checkPush('gender');
                        checkPush('realname');
                        checkPush('identity');
                        checkPush('birthDate');
                        window.winHigh += 220;
                    } 
                    window.winHigh += 100;
                    var canApplyNumber = '3';
                    var winTitle = '快速报名<span>（今日还可报名<em>'+canApplyNumber+'</em>次）</span>';
                }
                //有限制
                if (json.restrict.status || window.RESTRICTWIN) {
                    //判断简历和需求差别
                    checkRstrict(json.restrict);
                }
                
                //绑定方法
                $('.jz-checkbox').bind("click", jobExCheckFun);


                //弹出层
                $('#apply_jz_win_show').click();
                //加载视窗高度
                window.winHigh += 40; //提交按钮高度
                if(!json.isCityEqual) {
                    window.winHigh += 40; 
                }
                $('.js-modal:gt(1) > .js-modal-content').css("height",window.winHigh+"px");
                $('.js-modal:gt(1)').removeClass('modal-account');
                $('.js-modal:gt(1)').addClass('entry-form');
                $('.js-modal-title').html(winTitle);
                //视窗距离top最小值
                var winMarginTop = $('.js-show:eq(1)').first().offset().top;
                winMarginTop        = parseInt(winMarginTop);
                winMarginTopAbs     = Math.abs(winMarginTop);
                if (winMarginTop < 66 || winMarginTopAbs < 66) {
                    $('.js-show:eq(1)').first().offset({top:0});
                    $('.js-show:eq(1)').first().offset({top:66});
                }
                //重新绑定报名提交按钮
                $('.doApply').unbind("click");
                $('.doApply').bind("click", {doApplyPostId:postId,jobTypeId:jobType,postAdType:postAdType}, doApplyFun);
//end
            },
            'error' : function (json) {
                $('.js-modal-close').trigger('click');
                alert('服务器繁忙，请稍后再试');
                return false;
            }
        });
    
    }


    //获取报名信息
    var getApplyInfo = function (action) {
        var applyInfo = new Array();
        var applyInfoStr = '';
        var glus = '&';
        applyInfo['district']   = $('select[name="district"]:last').val();
        applyInfo['street']     = $('select[name="street"]:last').val();
        applyInfo['name']       = $('input[name="realname"]:last').val(); 
        applyInfo['gender']     = $('input[name="gender"]:checked').val();
        applyInfo['birthDate']  = $('select[name="birthDate"]:last').val();
        applyInfo['workTime']   = $('select[name=working_hours_select]:last').val() || 0;
        applyInfo['identity']   = $('input[name="identity"]:checked').val(); 
        applyInfo['jobEx']      = window.jobEx;
        applyInfo['health']     = $("input[name='health']:checked").val();
        applyInfo['height']     = $('input[name="height"]:last').val();
        applyInfo['weight']     = $('input[name="weight"]:last').val();
        applyInfo['entryDate']  = $('input[name="entryDate"]:last').val();
        applyInfo['register']   = window.USER_ID;
        applyInfo['personnel_demand'] = window.DEMAND;
        if(action == 'str') {
            var length = applyInfo.length;
            var step = 0;
            for (key in applyInfo) {
                if (step+1 == length) {   
                    glus = '';
                } else {
                    step++;
                }
                applyInfoStr += key + '='+applyInfo[key] + glus;
            }
            return applyInfoStr;
        }
        return applyInfo;
    }

    var clearApplyInfo = function () {
        $('option[name="districtDefined"]:last').attr({disabled:"false", selected:"selected"});
        $('select[name="street"]:last').html('<option value="0" name="streetDefined">商圈</option>');
        $('input[name="realname"]:last').val(''); 
        $('input[name="gender"]').attr('checked',false); 
        $('input[name="identity"]').attr('checked',false); 
        $('input[name="health"]').attr('checked',false); 
        $('.dateOfbirth:last').attr({selected:"selected"});
        $('select').attr("style","color:#aaa");
        $('input[name="jobEx"]:last').val('');
        $('input[name="height"]:last').val('');
        $('input[name="weight"]:last').val('');
        $('input[name="entryDate"]:last').val('');
        $('input[name="apply_phone"]:last').val('');
        $('input[name="apply_code"]:last').val('');
        $('input[name="apply_qcode"]:last').val('');
    };

    var clearError = function () {
        $('span[name="workAddrError"]:last').text('');
        $('span[name="nameError"]:last').text('');
        $('span[name="genderError"]:last').text('');
        $('span[name="birthError"]:last').text('');
        $('span[name="identityError"]:last').text('');
        $('span[name="heightError"]:last').text('');
        $('span[name="weightError"]:last').text('');
        $('span[name="demandError"]:last').text('');
        $('span[name="addrError"]:last').text('');
        $('span[name="entryDateError"]:last').text('');
        $('span[name="healthError"]:last').text('');
        $("span[name='qcodeError']").text('');
        $("span[name='qcodeErrorLast']:last").hide();
        $('.phoneError:last').text('');
        $('.codeError:last').text('');
    };

    //提交报名
    var doApplyFun = function (event) {
        if (!doCheck()) {
            return false;
        }
        if (window.USER_ID == '' || !window.USER_ID) {
            var isLogin     = window.doApplyLogin();
            if (!isLogin){
                return false;
            }
        }
        var postId      = event.data.doApplyPostId;
        var postAdType  = event.data.postAdType;
        var addressId   = $('select[name=post_addr_select]:last').val(); 
        var applyInfo   = getApplyInfo('str');
        var applyInfoArr= getApplyInfo();
        
        var jobType     = event.data.jobTypeId;
        $.ajax({
            'type' : 'POST',
            'url'  : 'http://www.doumi.com/api/v1/client/newapply/'+postId+'?addr_id='+addressId+'&jobType='+jobType,
            'data' : applyInfo,
            'async': false,
            'dataType' : 'json',
            'success' : function (json) {
                if (json.can_apply != -104 || (json.code == -104 && json.name == 'ApplyError') ) {
                    $("div[name='restrict_text']").parent().attr("style","display:block;");
                    $("div[name='restrict_text']").text(json.message);
                    $('.js-modal-close').trigger('click');
                    $('.js-modal:gt(1)').removeClass('entry-form');
                    $('.js-modal:gt(1)').addClass('modal-account');
                    $('.js-modal-title').html('提示');
                    $('.apply_restrict_error').trigger("click");
                }
                if (json.can_apply == -104) {
                    if (window.WHEREISPAGE == 'detail') {
                        window.location.href = "/uc/bsuc/?jtype="+jobType+"&postId=" + postId + "&applyId=" + json.id; 
                    } else {
                        $('#isApplySuccessWin').attr('data',postId);
                        $('#isApplySuccessWin').attr('data-adtype',postAdType);
                        $('#isApplySuccessWin').trigger("click");
                    }
                }
                return false;
            },
            'error': function (json) {
                $('.js-modal-close').trigger('click');
                var data = $.parseJSON(json.responseText);
                if (-208 == data.code) {
                    window.alert(data.message);
                    window.location.reload();
                    return false;
                }

                if (data.code == -106) {
                    $("div[name='restrict_text']").html('每人每天最多投递<em style="color: #fd8000;margin: 0 3px">3</em>个职位,您已经投递满<em style="color: #fd8000;margin: 0 3px">3</em>个职位');
                } else {
                    $("div[name='restrict_text']").text(data.message);
                }
                $("div[name='restrict_text']").parent().attr("style","display:block;");
                $('.js-modal-close').trigger('click');
                $('.js-modal:gt(1)').removeClass('entry-form');
                $('.js-modal:gt(1)').addClass('modal-account');
                $('.js-modal-title').html('提示');
                $('.apply_restrict_error').trigger("click");
                
                //alert('服务器繁忙，提交报名申请失败，请稍后再试');
                return false;
            }
        });
    
    }
    
    //快速提交报名
    var directApplyFun = function (postId, jobTypeId) {
        if (window.USER_ID == '' || !window.USER_ID) {
            $(".jz_lg:last").click();
            return false;
        }
        var postId      = postId;
        var applyInfo   = getApplyInfo('str');
        var applyInfoArr= getApplyInfo();
        var jobType     = jobTypeId;

        $.ajax({
            'type' : 'POST',
            'url'  : 'http://www.doumi.com/api/v1/client/newapply/'+postId+'?jobType='+jobType,
            'data' : applyInfo,
            'async': false,
            'dataType' : 'json',
            'success' : function (json) {
                if (json.can_apply != -104 || (json.code == -104 && json.name == 'ApplyError') ) {
                    $("div[name='restrict_text']").text(json.message);
                    $('.js-modal-close').trigger('click');
                    $('.js-modal:gt(1)').removeClass('entry-form');
                    $('.js-modal:gt(1)').addClass('modal-account');
                    $('.js-modal-title').html('提示');
                    $('.apply_restrict_error').trigger("click");
                }
                if (json.can_apply == -104) {
                    if (window.WHEREISPAGE == 'detail_58') {
                        $('#isApplySuccessWin').attr('data-adtype',jobType);
                        $('#isApplySuccessWin').attr('data',postId);
                        $('#isApplySuccessWin').trigger("click");
                    } else {
                        window.location.href = "/uc/bsuc/?jtype="+jobType+"&postId=" + postId + "&applyId=" + json.id;
                    }
                }
                return false;
            },
            'error': function (json) {
                $('.js-modal-close').trigger('click');
                var data = $.parseJSON(json.responseText);
                if (data.code == -106) {
                    $("div[name='restrict_text']").html('每人每天最多投递<em style="color: #fd8000;margin: 0 3px">3</em>个职位,您已经投递满<em style="color: #fd8000;margin: 0 3px">3</em>个职位');
                } else {
                    $("div[name='restrict_text']").text(data.message);
                }
                $('.js-modal-close').trigger('click');
                $('.js-modal:gt(1)').removeClass('entry-form');
                $('.js-modal:gt(1)').addClass('modal-account');
                $('.js-modal-title').html('提示');
                $('.apply_restrict_error').trigger("click");
                //alert('服务器繁忙，提交报名申请失败，请稍后再试');
                return false;
            }
        });
    }
    var dateFormat = function (a, b){
        if (typeof a === 'number' || typeof b === 'number') {
            a = String(a);
            b = String(b);
        }
        var startYear   = a.substr(0,4);
        var startMonth  = a.substr(4,2);
        var startDay    = a.substr(6);
        var endYear     = b.substr(0,4);
        var endMonth    = b.substr(4,2);
        var endDay      = b.substr(6);
        var dateStr,startDateStr,endDateStr;

        var startTime   = new Date(startYear + '/' + startMonth + '/' + startDay).getTime();
        var endTime     = new Date(endYear + '/' + endMonth + '/' + endDay).getTime();
        var dayDiff     = Math.floor(Math.abs(endTime - startTime) / 1000 / 60 / 60 /24 + 0.5);
        
        startDateStr    = startMonth + "月" + startDay +"日";
        endDateStr      = endMonth + "月" + endDay +"日";
        dateStr         = startDateStr + '-' + endDateStr + ' (共' + dayDiff + '天)';
        return dateStr;
    }

    //选择工作经验方法
    var jobExCheckFun = function () {
        var job_ex = $('input[name="jobEx"]:last').val();
        var tmp_ex = $(this).parent().text() + ' ';
        var tmp_ex_val = $(this).val() + '|';
        if ($(this).attr("checked") == "checked") {
            job_ex += tmp_ex;
            window.jobEx += tmp_ex_val;
        } else {
            job_ex = job_ex.replace(tmp_ex, '');
            window.jobEx = window.jobEx.replace(tmp_ex_val, '');
        }
        $('input[name="jobEx"]:last').val(job_ex);
        $('input[name="jobEx"]:last').blur();
    };

    //弹出窗口
    var showApplyWin = function (showList) {
        if (typeof showList == 'string') {
            if (showList == 'show') {
                $('.win_apply_login').show();
                $('.apply_win_content').show(); 
                $('.apply_win_restrict_addr').show();
                $('.apply_win_restrict_name_sex').show();
                $('.apply_win_restrict_age_identity').show();
                $('.apply_win_restrict_work_ex').show();
                $('.apply_win_restrict_healthcert').show();
                $('.apply_win_restrict_height_weight').show();
                $('.apply_win_restrict_height').show();
                $('.apply_win_restrict_height_weight').show();
                $('.apply_win_restrict_weight').show();
                $('.apply_win_restrict_entry_date').show();
                return false;
            }
            if (showList == 'hide') {
                $('.win_apply_login').hide();
                $('.apply_win_content').hide(); 
                $('.apply_win_restrict_addr').hide();
                $('.apply_win_restrict_name_sex').hide();
                $('.apply_win_restrict_age_identity').hide();
                $('.apply_win_restrict_work_ex').hide();
                $('.apply_win_restrict_healthcert').hide();
                $('.apply_win_restrict_height_weight').hide();
                $('.apply_win_restrict_height').hide();
                $('.apply_win_restrict_height_weight').hide();
                $('.apply_win_restrict_weight').hide();
                $('.apply_win_restrict_entry_date').hide();
                $('.working_hours').hide();
                $("div[name='win_apply_img_code']").hide();
                return false;
            }
        }
        for (var i in showList) {
            switch (showList[i]) {
                case 1 :
                    $('.apply_win_restrict_name_sex').show();
                    break;
                case 2 :
                    $('.apply_win_restrict_age_identity').show();
                    break;
                case 3 :
                    $('.apply_win_restrict_work_ex').show();
                    break;
                case 4 :
                    $('.apply_win_restrict_healthcert').show();
                    break;
                case 5 :
                    $('.apply_win_restrict_height_weight').show();
                    $('.apply_win_restrict_height').show();
                    break;
                case 6 :
                    $('.apply_win_restrict_height_weight').show();
                    $('.apply_win_restrict_weight').show();
                    break;
                case 7 :
                    $('.apply_win_restrict_entry_date').show();
                    break;
                case 8 :
                    $('.win_apply_login').show();
                    break;
                case 9 :
                    $('.apply_win_restrict_addr').show();
                    break;
                case 10:
                    $('.apply_win_content').show(); 
                    break;
                default:
            }
        }
    }

    //校验数组
    var checkPush = function (item) {
        window.checkArr.push(item); 
    }
    var doCheck = function () {
        var flag = true;
        window.checkFlag = new Array();
        for (var i in window.checkArr) {
            $("select[name='"+checkArr[i]+"']:last").blur();
            $("input[name='"+checkArr[i]+"']:last").blur();
        }

        for (var i in window.checkFlag) {
            if (!window.checkFlag[i]) {
                flag = false;
            }
        }

        return flag;
    }

    //报名限制
    var checkRstrict = function (personnelDemand) {
        var isHeightDemandShow = true;
        var isRestrictShow = false;
        if (personnelDemand.bm_address && !userAddr) {
            window.winHigh += 50;
            isRestrictShow  = true;
            checkPush('street');
            checkPush('district'); //加入验证数组
            $('.apply_win_restrict_addr').show();
        }
        if (personnelDemand.bm_experience && userWorkEx == 0) {
            var jobExHtml = '';
            $('input[name="jobEx"]:last').val('');
            for (var i in personnelDemand.experienceinfo) {
                jobExHtml += '<li><label>';
                jobExHtml += '<input class="jz-checkbox" type="checkbox" name="job_tag" value="';
                jobExHtml += personnelDemand.experienceinfo[i].id + '"';
                var jobExId = parseInt(personnelDemand.experienceinfo[i].id);
                if ($.inArray(jobExId, personnelDemand.work_exp) != -1) {
                    jobExHtml += ' checked="checked"';
                    var tmps = $('input[name="jobEx"]:last').val();
                    tmps = tmps + personnelDemand.experienceinfo[i].title + ' ';
                    $('input[name="jobEx"]:last').val(tmps);
                    window.jobEx += personnelDemand.experienceinfo[i].id + '|';
                }
                jobExHtml += '>';
                jobExHtml += personnelDemand.experienceinfo[i].title;
                jobExHtml += '</label></li>';
            }
            window.winHigh += 50;
            isRestrictShow = true;
            checkPush('jobEx');
            $('.jz-sel-option').hide();
            $('.jz-sel-option > ul').html(jobExHtml);
            $('.apply_win_restrict_work_ex').show();
        }
        if (personnelDemand.bm_healthcards && (userHealth == '0' || !userHealth)) {
            window.winHigh += 50;
            isRestrictShow = true;
            checkPush('health');
            $('.apply_win_restrict_healthcert').show();
        }
        if (personnelDemand.bm_weight && (userWeight == '0' || !userWeight)) {
            if (isHeightDemandShow) {
                window.winHigh += 50;
                $('.apply_win_restrict_height_weight').show();
                isHeightDemandShow = false;
            }
            isRestrictShow = true;
            checkPush('weight');
            $('.apply_win_restrict_weight').show();
        }
        if (personnelDemand.bm_height && (userHeight == '0' || !userHeight)) {
            if (isHeightDemandShow) {
                window.winHigh += 50;
                $('.apply_win_restrict_height_weight').show();
            }
            isRestrictShow = true;
            checkPush('height');
            $('.apply_win_restrict_height').show();
        }
        if (personnelDemand.bm_workdate) {
            window.winHigh += 50;
            isRestrictShow = true;
            checkPush('entryDate');
            $('.apply_win_restrict_entry_date').show();
        }
        if (isRestrictShow || window.RESTRICTWIN) {
            window.winHigh += 70;
            if (window.RESTRICTWIN) {
                window.winHigh += 50;
            }
            $('.apply_win_content').show(); 
        }
    };

    // 获取商圈
    var getStreetsOption = function (districtId) {
        $.ajax({
            'type' : 'GET',
            'url'  : 'http://www.doumi.com/api/v1/client/streets/'+districtId,
            'dataType' : 'json',
            'success' : function (json) {
                var optionHtml = '';
                for (var i in json.streets) {
                    if (i == 0) {continue;}
                    optionHtml += '<option value="'+ json.streets[i].id +'">';
                    optionHtml += json.streets[i].name+'</option>';
                }
                window.districtOption[districtId] = optionHtml;
                $('.street-option').html(window.districtOption[districtId]);
                return true;
            },
            'error' : function (json) {
                //$('.js-modal-close').trigger('click');
                alert('服务器繁忙，请稍后再试');
                return false;
            }
        });
    }

    //创建出生年份下拉菜单
    var createDateOfBirthOption = function () {
        var y   = new Date().getFullYear();
        var str = '';
        for (var i = (y-15); i > (y - 80); i--) //以今年为准到前15年到80年
        {
                var age = y - i;
                str += "<option value='" + i + "-01'> " + i + " 年" + "</option>\r\n";
        } 
        $('.dateOfbirth:last').after(str);
    }

    //日历
    GJ.use('jquery', function() {
        GJ.use('js/util/datepicker/datepickerOfClass.js', function() {
            var date = new Date();
            var maxDate = date.getDate() + 30;
            GJ.datepicker({
                containerClass: 'job_entry_date',
                defaultDate: date,
                minDate:date,
                maxDate:maxDate,
                onSelect: function(dateText, inst) {
                    $("input[name='entryDate']:last").val(dateText);
                }
            });
        });
    });

    //取消报名&报名成功弹窗
    GJ.use('panel,js/util/modal/modal.js, js/util/modal/modal.css', function(Modal){
        $(".chk").click( function() {
            var goUrl = $(this).attr('url');
            window.location.href = goUrl;
        });

        $(".word-jiang-ico").mouseover(function(){
            $(this).next().show();
        }).mouseout(function(){
            $(this).next().hide();
        });

        $(".check_phone").click(function () {
            var pid = $(this).attr('data');
            //百度统计
            _hmt.push(['_trackEvent', 'pc_list_checkphone_button', 'click', pid]);
            var userId = '';
            if(userId == '') {
                $('.jz_lg').trigger('click');
                return false;
            }

            $(this).hide();
            $('.apply_tel_' + pid).show();
        });

        $('#isApplySuccessWin').live("click",function(){
            
            $('.js-modal-close').trigger('click'); //关闭所有弹窗
            var postId     = $('#isApplySuccessWin').attr("data");
            var postAdType = $('#isApplySuccessWin').attr("data-adtype");
            var caSource   = "";

            var successUrl = "http://www.doumi.com/post/applySuccess/apply/" + postId + '/' + caSource;

            if (typeof postId == 'undefine' || postId == '') return false;

            var width  = 470;
            var height = 385;

            GJ.panel({
                title    : '报名成功'
                ,url     : successUrl
                ,iframe  : true 
                ,style   : 'text'
                ,mask    : true
                ,width   : width
                ,height  : height
                ,onClose : function(){
                    $('.js-modal-close').trigger('click');
                    window.top.location.reload();
                }
                ,iframeScrolling : false
            });
        });

        $('.apply_cancel_class').click( function () {
            var postId = $(this).attr('data');
            var panel = GJ.confirm({
                title    : '取消报名'
                ,content : '确定要取消报名吗？'
                ,mask    : true
                ,width   : 300
                ,height  : 150
                ,onClose : function(){
                },
                onSubmit:  function(){
                    $.ajax({
                        'type' : 'PUT',
                        'url'  : 'http://www.doumi.com/api/v1/client/apply/'+postId,
                        'dataType' : 'json',
                        'success' : function (json) {
                            window.location.reload();
                         },
                        'error' : function (json) {
                            var jsonmsg = $.parseJSON(json.responseText);

                            if (-208 == jsonmsg.code) {
                                window.alert(jsonmsg.message);
                            } 
                            window.location.reload();
                        }
                    });

                },
                onCancel:  function(){
                }
            });
        });

    });
</script>
    
    <script type="text/javascript">
                window.PAGE_CONFIG = {"fromInfo":{"ca_source":null,"ca_platform":1,"qr_code_type":null,"qr_code_invite":null},"logTracker":{"dmch":"\/jianzhi\/bj\/-\/0\/0_0_0_0\/list\/@pn=1@city=bj","listShowPostId":"[{\"id\":2576256,\"ad_types\":0},{\"id\":2493202,\"ad_types\":0},{\"id\":2733841,\"ad_types\":0},{\"id\":2629852,\"ad_types\":0},{\"id\":2836433,\"ad_types\":0},{\"id\":2602280,\"ad_types\":0},{\"id\":2814522,\"ad_types\":0},{\"id\":2811241,\"ad_types\":0},{\"id\":2632677,\"ad_types\":0},{\"id\":2659057,\"ad_types\":0},{\"id\":1899095,\"ad_types\":1},{\"id\":2320703,\"ad_types\":1},{\"id\":1575661,\"ad_types\":1},{\"id\":2081361,\"ad_types\":1},{\"id\":2287988,\"ad_types\":1},{\"id\":2500448,\"ad_types\":1},{\"id\":2757729,\"ad_types\":1},{\"id\":2792254,\"ad_types\":1},{\"id\":2765752,\"ad_types\":1},{\"id\":2793442,\"ad_types\":1},{\"id\":2814698,\"ad_types\":1},{\"id\":2664534,\"ad_types\":1},{\"id\":2751488,\"ad_types\":1},{\"id\":2266797,\"ad_types\":1},{\"id\":2837591,\"ad_types\":1},{\"id\":2783311,\"ad_types\":1},{\"id\":2791822,\"ad_types\":1},{\"id\":2782573,\"ad_types\":1},{\"id\":2782464,\"ad_types\":1},{\"id\":2470180,\"ad_types\":1},{\"id\":2843272,\"ad_types\":1},{\"id\":2737030,\"ad_types\":1},{\"id\":2762871,\"ad_types\":1},{\"id\":2776993,\"ad_types\":1},{\"id\":2699174,\"ad_types\":1}]"},"icityDomainPage":"bj"} || {};
                GJ.use('app/common/widget/widget.js', function(widget) { 
            widget.initWidgets(); 
        }); 
        GJ.use('app/ms_v2/zhiyou/list.js', function(Page){
            Page.run();
            var currentBigCateIndex = $('.big-cate li.active').index();
            var delayTimerEvent;
            $('.big-cate li').on('mouseover', function(){
                var that = this;
                delayTimerEvent = setTimeout(function(){
                    $(that).addClass('active').siblings().removeClass('active');
                    var index = $('.big-cate li').index(that);
                    $('div.filter-cate-content > ul').eq(index).show().siblings().hide();
                }, 180);
            }).on('mouseleave', function(){
                clearTimeout(delayTimerEvent);
            });
            $('.fake-select').hover(function() {
                $(this).addClass('active');
            }, function() {
                $(this).removeClass('active');
            });
            $('dd[data-role="hover-area"]').on('mouseleave', function(){
                $('.big-cate li').eq(currentBigCateIndex).addClass('active').siblings().removeClass('active');
                $('div.filter-cate-content > ul').eq(currentBigCateIndex).show().siblings().hide();
            });
            $('a[data-role="second_level_jobtype"]').on('click', function(e){
                e.preventDefault();
                var dataTargetId = $(this).attr('data-target-id');
                window.document.cookie = 'dm_pc_list_bigtab_tagid=' + dataTargetId + '; path=/; domain=.doumi.com';
                window.location.href = $(this).attr('href');
            });
        });
    </script>
    <script>
var _hmt = _hmt || [];
(function() {
    var hm = document.createElement("script");
    hm.src = "//hm.baidu.com/hm.js?5ce0ad453d8e97ccbaafe0027ce9e106";
    var s = document.getElementsByTagName("script")[0]; 
    s.parentNode.insertBefore(hm, s);
})();
</script>
        <script>
(function(){
    var bp = document.createElement('script');
    bp.src = '//push.zhanzhang.baidu.com/push.js';
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
})();
</script>
    </body>
</html>
